summaryrefslogtreecommitdiff
path: root/test/parallel/test-worker-exit-event-error.js
blob: e2427c7dff726b6e277fa98e16ebbecbf15293a6 (plain)
1
2
3
4
5
6
7
8
'use strict';
const common = require('../common');
const { Worker } = require('worker_threads');

process.on('uncaughtException', common.mustCall());

new Worker('', { eval: true })
  .on('exit', common.mustCall(() => { throw new Error('foo'); }));