From df08779e0dfa82ceb69e129ae0548e97352aaddf Mon Sep 17 00:00:00 2001 From: Michaël Zasso Date: Tue, 17 Jul 2018 08:23:49 +0200 Subject: test: make crashOnUnhandleRejection opt-out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Gus Caplan Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- test/parallel/test-fs-promises-file-handle-chmod.js | 1 - 1 file changed, 1 deletion(-) (limited to 'test/parallel/test-fs-promises-file-handle-chmod.js') diff --git a/test/parallel/test-fs-promises-file-handle-chmod.js b/test/parallel/test-fs-promises-file-handle-chmod.js index 8b9d8b1c0d..6b51639d41 100644 --- a/test/parallel/test-fs-promises-file-handle-chmod.js +++ b/test/parallel/test-fs-promises-file-handle-chmod.js @@ -13,7 +13,6 @@ const assert = require('assert'); const tmpDir = tmpdir.path; tmpdir.refresh(); -common.crashOnUnhandledRejection(); async function validateFilePermission() { const filePath = path.resolve(tmpDir, 'tmp-chmod.txt'); -- cgit v1.2.3