change test

This commit is contained in:
DieMyst 2021-11-17 10:31:55 +03:00
parent e5a1324c2c
commit 51d28983d9

View File

@ -1,4 +1,3 @@
import {callArrowCall} from "../examples/callArrowCall";
import {krasnodar, stage, testNet} from '@fluencelabs/fluence-network-environment'; import {krasnodar, stage, testNet} from '@fluencelabs/fluence-network-environment';
import { exec } from "child_process"; import { exec } from "child_process";
@ -27,11 +26,11 @@ describe('Testing run command', () => {
// get element before last in output // get element before last in output
const result = stdout.split("\n").slice(-2)[0] const result = stdout.split("\n").slice(-2)[0]
const toCheck = [message, message2].join(",") const toCheck = [message, message2].join(",")
if (toCheck === message) { if (toCheck === result) {
console.log("Test passed.") console.log("Test passed.")
process.exit(0) process.exit(0)
} else { } else {
console.log(`Incorrect message returned. Returned: ${result}. Expected: ${message}`) console.log(`Incorrect message returned. Returned: ${result}. Expected: ${toCheck}`)
process.exit(1) process.exit(1)
} }
}); });