summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-04-27 18:09:57 +0200
committerAnna Henningsen <anna@addaleax.net>2017-04-29 17:22:35 +0200
commit3d87eca1e5c573f6b3f29e263e6718b78054e5e5 (patch)
treec484d0b167e0518fc029282a9bb56268d0039ef7 /test
parent719247ff9575d1a4ab6adc11e6923e9b2335053c (diff)
downloadandroid-node-v8-3d87eca1e5c573f6b3f29e263e6718b78054e5e5.tar.gz
android-node-v8-3d87eca1e5c573f6b3f29e263e6718b78054e5e5.tar.bz2
android-node-v8-3d87eca1e5c573f6b3f29e263e6718b78054e5e5.zip
test,doc: document `crashOnUnhandledRejection()`
Add documentation for `common.crashOnUnhandledRejection()`. Ref: https://github.com/nodejs/node/pull/12489/files/a9c2078a60bc3012dc6156df19772697a56a2517#r113737423 PR-URL: https://github.com/nodejs/node/pull/12699 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>
Diffstat (limited to 'test')
-rw-r--r--test/README.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/README.md b/test/README.md
index 6b073c7572..5a35a039c5 100644
--- a/test/README.md
+++ b/test/README.md
@@ -186,6 +186,13 @@ doesn't have privileges to create symlinks (specifically
[SeCreateSymbolicLinkPrivilege](https://msdn.microsoft.com/en-us/library/windows/desktop/bb530716(v=vs.85).aspx)).
On non-Windows platforms, this currently returns true.
+### 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)