1// Flags: --unhandled-rejections=none 2'use strict'; 3 4const common = require('../common'); 5 6// Verify that ignoring unhandled rejection works fine and that no warning is 7// logged. 8 9new Promise(() => { 10 throw new Error('One'); 11}); 12 13Promise.reject('test'); 14 15process.on('warning', common.mustNotCall('warning')); 16process.on('uncaughtException', common.mustNotCall('uncaughtException')); 17process.on('rejectionHandled', common.mustNotCall('rejectionHandled')); 18 19process.on('unhandledRejection', common.mustCall(2)); 20 21setTimeout(common.mustCall(), 2); 22