diff --git a/test/parallel/test-debug-prompt.js b/test/parallel/test-debug-prompt.js index fdc3b4c27f4d45..82120859c7ca8a 100644 --- a/test/parallel/test-debug-prompt.js +++ b/test/parallel/test-debug-prompt.js @@ -1,13 +1,14 @@ 'use strict'; -const assert = require('assert'); -const common = require('../common'); +require('../common'); const spawn = require('child_process').spawn; const proc = spawn(process.execPath, ['debug', 'foo']); proc.stdout.setEncoding('utf8'); -proc.stdout.once('data', common.mustCall((data) => { - assert.strictEqual(data, 'debug> '); - proc.kill(); -})); +let output = ''; +proc.stdout.on('data', (data) => { + output += data; + if (output.includes('debug> ')) + proc.kill(); +});