1 'use strict'; 2 const common = require('../common'); 3 const { Worker } = require('worker_threads'); 4 5 process.on('uncaughtException', common.mustCall()); 6 7 new Worker('', { eval: true }) 8 .on('exit', common.mustCall(() => { throw new Error('foo'); })); 9