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