Skip to content

Commit

Permalink
test,doc: document crashOnUnhandledRejection()
Browse files Browse the repository at this point in the history
Add documentation for `common.crashOnUnhandledRejection()`.

Ref: https://github.com/nodejs/node/pull/12489/files/a9c2078a60bc3012dc6156df19772697a56a2517#r113737423
PR-URL: #12699
Backport-PR-URL: #13103
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
  • Loading branch information
addaleax authored and MylesBorins committed Jul 11, 2017
1 parent 4eb28c8 commit 4dff128
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ A stream to push an array into a REPL

Blocks for `time` amount of time.

### crashOnUnhandledRejection()

Installs a `process.on('unhandledRejection')` handler that crashes the process
after a tick. This is useful for tests that use Promises and need to make sure
no unexpected rejections occur, because currently they result in silent
failures.

### ddCommand(filename, kilobytes)
* return [&lt;Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)

Expand Down

0 comments on commit 4dff128

Please sign in to comment.