diff options
author | Rich Trott <rtrott@gmail.com> | 2018-12-13 09:17:35 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-12-14 06:41:19 -0800 |
commit | 914c49497cd92a9266cf5aaed1f425358d1023cc (patch) | |
tree | f65a282ce160e3e52916866223b20f798729a8fd /test/sequential/test-cli-syntax-file-not-found.js | |
parent | 80ab537ee6fa5513399b86ab439d954387d88772 (diff) | |
download | android-node-v8-914c49497cd92a9266cf5aaed1f425358d1023cc.tar.gz android-node-v8-914c49497cd92a9266cf5aaed1f425358d1023cc.tar.bz2 android-node-v8-914c49497cd92a9266cf5aaed1f425358d1023cc.zip |
test: increase error information in test-cli-syntax-*
If there is an error, but not the error code the test expects, display
more information about the error.
PR-URL: https://github.com/nodejs/node/pull/25021
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Diffstat (limited to 'test/sequential/test-cli-syntax-file-not-found.js')
-rw-r--r-- | test/sequential/test-cli-syntax-file-not-found.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/sequential/test-cli-syntax-file-not-found.js b/test/sequential/test-cli-syntax-file-not-found.js index 848e2fe231..b90033a396 100644 --- a/test/sequential/test-cli-syntax-file-not-found.js +++ b/test/sequential/test-cli-syntax-file-not-found.js @@ -33,7 +33,8 @@ const notFoundRE = /^Error: Cannot find module/m; // stderr should have a module not found error message assert(notFoundRE.test(stderr), `${notFoundRE} === ${stderr}`); - assert.strictEqual(err.code, 1); + assert.strictEqual(err.code, 1, + `code ${err.code} !== 1 for error:\n\n${err}`); })); }); }); |