Skip to content

Commit d09bec8

Browse files
TrottMylesBorins
authored andcommitted
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 PR-URL: #20948 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 460add9 commit d09bec8

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)