diff options
author | Antoine du HAMEL <duhamelantoine1995@gmail.com> | 2019-11-20 21:48:49 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2019-12-16 13:23:47 +0300 |
commit | 024b6588313a0e32595317936ee279dec7a5a756 (patch) | |
tree | 612e5b708375011e20baea8c1deaeda7565b5bb8 /test | |
parent | a68729cf3d02798ec88fffa20575074b6332ade8 (diff) |
process: refs --unhandled-rejections documentation in warning message
Refs: https://github.com/nodejs/node/issues/20392
PR-URL: https://github.com/nodejs/node/pull/30564
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-promises-unhandled-proxy-rejections.js | 5 | ||||
-rw-r--r-- | test/parallel/test-promises-unhandled-symbol-rejections.js | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/test/parallel/test-promises-unhandled-proxy-rejections.js b/test/parallel/test-promises-unhandled-proxy-rejections.js index 659db4d1791..31d2ed27ed0 100644 --- a/test/parallel/test-promises-unhandled-proxy-rejections.js +++ b/test/parallel/test-promises-unhandled-proxy-rejections.js @@ -12,7 +12,10 @@ const expectedPromiseWarning = ['Unhandled promise rejection. ' + 'This error originated either by throwing ' + 'inside of an async function without a catch ' + 'block, or by rejecting a promise which was ' + - 'not handled with .catch(). (rejection id: 1)']; + 'not handled with .catch(). To terminate the ' + + 'node process on unhandled promise rejection, ' + + 'use the CLI flag `--unhandled-rejections=strict` (see ' + + 'https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)']; function throwErr() { throw new Error('Error from proxy'); diff --git a/test/parallel/test-promises-unhandled-symbol-rejections.js b/test/parallel/test-promises-unhandled-symbol-rejections.js index 460acaca57c..3672c8700d6 100644 --- a/test/parallel/test-promises-unhandled-symbol-rejections.js +++ b/test/parallel/test-promises-unhandled-symbol-rejections.js @@ -13,7 +13,10 @@ const expectedPromiseWarning = ['Unhandled promise rejection. ' + 'This error originated either by throwing ' + 'inside of an async function without a catch ' + 'block, or by rejecting a promise which was ' + - 'not handled with .catch(). (rejection id: 1)']; + 'not handled with .catch(). To terminate the ' + + 'node process on unhandled promise rejection, ' + + 'use the CLI flag `--unhandled-rejections=strict` (see ' + + 'https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)']; common.expectWarning({ DeprecationWarning: expectedDeprecationWarning, |