1'use strict'; 2const common = require('../../common'); 3const assert = require('assert'); 4const test_async = require(`./build/${common.buildType}/test_async`); 5 6process.on('uncaughtException', common.mustCall(function(err) { 7 try { 8 throw new Error('should not fail'); 9 } catch (err) { 10 assert.strictEqual(err.message, 'should not fail'); 11 } 12 assert.strictEqual(err.message, 'uncaught'); 13})); 14 15// Successful async execution and completion callback. 16test_async.Test(5, {}, common.mustCall(function() { 17 throw new Error('uncaught'); 18})); 19