1'use strict'; 2const common = require('../common'); 3const assert = require('assert'); 4 5process.once('uncaughtException', common.mustCall((err) => { 6 common.expectsError({ 7 message: 'Timeout Error' 8 })(err); 9})); 10 11let called = false; 12const t = setTimeout(() => { 13 assert(!called); 14 called = true; 15 t.ref(); 16 throw new Error('Timeout Error'); 17}, 1).unref(); 18 19setTimeout(common.mustCall(), 1); 20