Skip to content

Commit 5baf75c

Browse files
committed
test: improve error message in async-wrap test
Improve AssertionError message in test/parallel/test-async-wrap-pop-id-during-load.js to include the contents of stderr when the spawned process fails. Refs: https://github.com/nodejs/node/pull/20940/files#r190707951
1 parent 6caecc6 commit 5baf75c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/parallel/test-async-wrap-pop-id-during-load.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ const ret = spawnSync(
1717
process.execPath,
1818
['--stack_size=50', __filename, 'async']
1919
);
20-
assert.strictEqual(ret.status, 0);
20+
assert.strictEqual(ret.status, 0,
21+
`EXIT CODE: ${ret.status}, STDERR:\n${ret.stderr}`);
2122
const stderr = ret.stderr.toString('utf8', 0, 2048);
2223
assert.ok(!/async.*hook/i.test(stderr));
2324
assert.ok(stderr.includes('UnhandledPromiseRejectionWarning: Error'), stderr);

0 commit comments

Comments
 (0)