Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
  • Loading branch information
Trott committed May 24, 2018
commit 5baf75cc48cb1fb25d1ebe78825bdaba9a7bc94d
3 changes: 2 additions & 1 deletion test/parallel/test-async-wrap-pop-id-during-load.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const ret = spawnSync(
process.execPath,
['--stack_size=50', __filename, 'async']
);
assert.strictEqual(ret.status, 0);
assert.strictEqual(ret.status, 0,
`EXIT CODE: ${ret.status}, STDERR:\n${ret.stderr}`);
const stderr = ret.stderr.toString('utf8', 0, 2048);
assert.ok(!/async.*hook/i.test(stderr));
assert.ok(stderr.includes('UnhandledPromiseRejectionWarning: Error'), stderr);