test: use common.mustCall in test-worker-esm-exit

PR-URL: https://github.com/nodejs/node/pull/32544
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
pull/32617/head
himself65 2020-03-29 14:06:58 +08:00 committed by Anna Henningsen
parent a6ab883eaa
commit 060a170e29
No known key found for this signature in database
GPG Key ID: A94130F0BFC8EBE9
1 changed files with 3 additions and 1 deletions

View File

@ -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))
);