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: #24720
Refs: #24403
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
joyeecheung authored and BethGriggs committed Feb 12, 2019
1 parent 1c593c8 commit 46e37ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/parallel/test-cli-syntax.js
Original file line number Diff line number Diff line change
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 46e37ad

Please sign in to comment.