0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/doc/guides
Michaël Zasso df08779e0d
test: make crashOnUnhandleRejection opt-out
This commit removes `common.crashOnUnhandledRejection()` and adds
`common.disableCrashOnUnhandledRejection()`.

To reduce the risk of mistakes and make writing tests that involve
promises simpler, always install the unhandledRejection hook in tests
and provide a way to disable it for the rare cases where it's needed.

PR-URL: https://github.com/nodejs/node/pull/21849
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-07-19 08:47:28 +02:00
..
contributing doc: wrap pull-requests.md at 80 characters 2018-06-16 07:54:30 -07:00
doc_img
backporting-to-release-lines.md doc: use american spelling as per style guide 2017-12-23 13:59:07 +01:00
building-node-with-ninja.md doc: replace to Node.js 2018-03-06 00:46:30 +09:00
maintaining-npm.md doc: add policy for landing new npm releases 2018-07-13 16:06:30 -04:00
maintaining-the-build-files.md doc: add new documentation lint rule 2018-02-23 16:26:29 +00:00
maintaining-V8.md doc: make the background section concise and improve its formality 2018-02-27 11:17:15 -03:00
node-postmortem-support.md doc: replace to Node.js 2018-03-06 00:46:30 +09:00
using-internal-errors.md doc: update internal errors documentation 2018-03-10 12:15:12 +01:00
writing-and-running-benchmarks.md doc: update writing-and-running-benchmarks.md 2018-05-02 22:24:40 -07:00
writing-tests.md test: make crashOnUnhandleRejection opt-out 2018-07-19 08:47:28 +02:00