Skip to content

Commit 3efaa8e

Browse files
addaleaxevanlucas
authored andcommitted
test,doc: document crashOnUnhandledRejection()
Add documentation for `common.crashOnUnhandledRejection()`. Ref: https://github.com/nodejs/node/pull/12489/files/a9c2078a60bc3012dc6156df19772697a56a2517#r113737423 PR-URL: #12699 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent 780fa39 commit 3efaa8e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,13 @@ doesn't have privileges to create symlinks (specifically
186186
[SeCreateSymbolicLinkPrivilege](https://msdn.microsoft.com/en-us/library/windows/desktop/bb530716(v=vs.85).aspx)).
187187
On non-Windows platforms, this currently returns true.
188188

189+
### crashOnUnhandledRejection()
190+
191+
Installs a `process.on('unhandledRejection')` handler that crashes the process
192+
after a tick. This is useful for tests that use Promises and need to make sure
193+
no unexpected rejections occur, because currently they result in silent
194+
failures.
195+
189196
### ddCommand(filename, kilobytes)
190197
* return [&lt;Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
191198

0 commit comments

Comments
 (0)