diff --git a/test/parallel/test-repl-unsupported-option.js b/test/parallel/test-repl-unsupported-option.js index c5b234614983f6..210e056b3ab0ae 100644 --- a/test/parallel/test-repl-unsupported-option.js +++ b/test/parallel/test-repl-unsupported-option.js @@ -7,4 +7,5 @@ const { spawnSync } = require('child_process'); const result = spawnSync(process.execPath, ['-i', '--input-type=module']); -assert.match(result.stderr.toString(), /Cannot specify --input-type for REPL/); +assert.strictEqual(result.stderr.toString(), 'Cannot specify --input-type for REPL\n'); +assert.notStrictEqual(result.exitCode, 0);