nodejs-mozilla/test/parallel/test-promise-handled-reject...

9 lines
301 B
JavaScript
Raw Normal View History

2022-07-18 11:52:00 +08:00
'use strict';
const common = require('../common');
// This test verifies that DEP0018 does not occur when rejections are handled.
common.disableCrashOnUnhandledRejection();
process.on('warning', common.mustNotCall());
process.on('unhandledRejection', common.mustCall());
Promise.reject(new Error());