Skip to content

Commit 085f5b6

Browse files
joyeecheungBridgeAR
authored andcommitted
test: show stdout and stderr in test-cli-syntax when it fails
To help debugging the flake with the log from the CI. PR-URL: #24720 Refs: #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>
1 parent 25e5164 commit 085f5b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/parallel/test-cli-syntax.js

+6
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ const notFoundRE = /^Error: Cannot find module/m;
3434

3535
const cmd = [node, ..._args].join(' ');
3636
exec(cmd, common.mustCall((err, stdout, stderr) => {
37+
if (err) {
38+
console.log('-- stdout --');
39+
console.log(stdout);
40+
console.log('-- stderr --');
41+
console.log(stderr);
42+
}
3743
assert.ifError(err);
3844
assert.strictEqual(stdout, '');
3945
assert.strictEqual(stderr, '');

0 commit comments

Comments
 (0)