mirror of
https://github.com/nodejs/node.git
synced 2025-04-30 23:56:58 +00:00

Use the --unhandled-rejections=none CLI flag instead. PR-URL: https://github.com/nodejs/node/pull/38210 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
8 lines
258 B
JavaScript
8 lines
258 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
// This test verifies that DEP0018 does not occur when rejections are handled.
|
|
process.on('warning', common.mustNotCall());
|
|
process.on('unhandledRejection', common.mustCall());
|
|
Promise.reject(new Error());
|