diff options
author | Rich Trott <rtrott@gmail.com> | 2018-05-24 13:54:21 -0700 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-05-25 18:52:09 +0200 |
commit | f315081dc7abdcc2e96c55b17ff89e4c76008e9b (patch) | |
tree | 225c7ccc640cbd1585bc83253b3d833f6b5b707c /test/parallel/test-async-wrap-pop-id-during-load.js | |
parent | cfc9d0468c224587ca555e570440b3df688b282d (diff) | |
download | android-node-v8-f315081dc7abdcc2e96c55b17ff89e4c76008e9b.tar.gz android-node-v8-f315081dc7abdcc2e96c55b17ff89e4c76008e9b.tar.bz2 android-node-v8-f315081dc7abdcc2e96c55b17ff89e4c76008e9b.zip |
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: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test/parallel/test-async-wrap-pop-id-during-load.js')
-rw-r--r-- | test/parallel/test-async-wrap-pop-id-during-load.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-async-wrap-pop-id-during-load.js b/test/parallel/test-async-wrap-pop-id-during-load.js index 4cf1ef472b..d9fffd397f 100644 --- a/test/parallel/test-async-wrap-pop-id-during-load.js +++ b/test/parallel/test-async-wrap-pop-id-during-load.js @@ -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); |