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