diff --git a/test/parallel/test-vm-sigint.js b/test/parallel/test-vm-sigint.js index 4d93ec32c0..b1ad616405 100644 --- a/test/parallel/test-vm-sigint.js +++ b/test/parallel/test-vm-sigint.js @@ -1,5 +1,6 @@ 'use strict'; const common = require('../common'); + const assert = require('assert'); const vm = require('vm'); @@ -15,7 +16,7 @@ if (process.argv[2] === 'child') { const method = process.argv[3]; const listeners = +process.argv[4]; assert.ok(method); - assert.ok(typeof listeners, 'number'); + assert.ok(Number.isInteger(listeners)); const script = `process.send('${method}'); while(true) {}`; const args = method === 'runInContext' ? @@ -24,7 +25,7 @@ if (process.argv[2] === 'child') { const options = { breakOnSigint: true }; for (let i = 0; i < listeners; i++) - process.on('SIGINT', common.noop); + process.on('SIGINT', common.mustNotCall()); assert.throws(() => { vm[method](script, ...args, options); }, /^Error: Script execution interrupted\.$/);