DEV: Better output when assertion fails in smoke test.

This commit is contained in:
Guo Xiang Tan 2018-06-05 10:54:56 +08:00
parent a508e6a5f6
commit c27863aad2
1 changed files with 8 additions and 1 deletions

View File

@ -231,7 +231,14 @@ const path = require('path');
return promise;
}, output => {
return output.match("I can even write a reply");
const expected = "I can even write a reply";
const matched = output.match(expected);
if (!matched) {
console.log(`Expected '${output}' to match '${expected}'`);
}
return matched;
});
await exec("submit the topic", () => {