diff --git a/test/parallel/test-worker-esm-exit.js b/test/parallel/test-worker-esm-exit.js index c0b9d874895725..aebb17edda0baf 100644 --- a/test/parallel/test-worker-esm-exit.js +++ b/test/parallel/test-worker-esm-exit.js @@ -7,4 +7,6 @@ const { Worker } = require('worker_threads'); const w = new Worker(fixtures.path('es-modules/import-process-exit.mjs'), { execArgv: ['--experimental-modules'] }); w.on('error', common.mustNotCall()); -w.on('exit', (code) => assert.strictEqual(code, 42)); +w.on('exit', + common.mustCall((code) => assert.strictEqual(code, 42)) +);