Skip to content

Commit

Permalink
test: show stdout and stderr in test-cli-syntax when it fails
Browse files Browse the repository at this point in the history
To help debugging the flake with the log from the CI.

PR-URL: nodejs#24720
Refs: nodejs#24403
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
joyeecheung authored and refack committed Jan 10, 2019
1 parent bda24bd commit b298ec3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/parallel/test-cli-syntax.js
Expand Up @@ -34,6 +34,12 @@ const notFoundRE = /^Error: Cannot find module/m;

const cmd = [node, ..._args].join(' ');
exec(cmd, common.mustCall((err, stdout, stderr) => {
if (err) {
console.log('-- stdout --');
console.log(stdout);
console.log('-- stderr --');
console.log(stderr);
}
assert.ifError(err);
assert.strictEqual(stdout, '');
assert.strictEqual(stderr, '');
Expand Down

0 comments on commit b298ec3

Please sign in to comment.