diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-04-19 18:41:33 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2018-04-25 23:46:08 +0800 |
commit | 3152b7c0d329893d2fe9f74ff4f334d182a10545 (patch) | |
tree | a79c4d4e578bf30020f19c6a71311ab748d34b52 /test/parallel/test-repl-sigint-nested-eval.js | |
parent | 94e0e2c787deade5702026b6d6eea8dcfee3b6a3 (diff) | |
download | node-new-3152b7c0d329893d2fe9f74ff4f334d182a10545.tar.gz |
src: assign ERR_SCRIPT_EXECUTION_* codes in C++
Also modifies the error messages so they include more information
and are more consistent.
- The message of ERR_SCRIPT_EXECUTION_INTERRUPTED now mentions
SIGINT and the trailing period is dropped for consistency.
- Added ERR_SCRIPT_EXECUTION_TIMEOUT and include the timeout
in the message.
PR-URL: https://github.com/nodejs/node/pull/20147
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test/parallel/test-repl-sigint-nested-eval.js')
-rw-r--r-- | test/parallel/test-repl-sigint-nested-eval.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-repl-sigint-nested-eval.js b/test/parallel/test-repl-sigint-nested-eval.js index 7f15b7dfeb..ea07393527 100644 --- a/test/parallel/test-repl-sigint-nested-eval.js +++ b/test/parallel/test-repl-sigint-nested-eval.js @@ -34,10 +34,10 @@ child.stdout.once('data', common.mustCall(() => { })); child.on('close', function(code) { - assert.strictEqual(code, 0); + const expected = 'Script execution was interrupted by `SIGINT`'; assert.ok( - stdout.includes('Script execution interrupted.'), - `Expected stdout to contain "Script execution interrupted.", got ${stdout}` + stdout.includes(expected), + `Expected stdout to contain "${expected}", got ${stdout}` ); assert.ok( stdout.includes('foobar'), |