Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

test: fix test-debug-port-from-cmdline #25748

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/simple/test-debug-port-from-cmdline.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ var assert = require('assert');
var spawn = require('child_process').spawn;

var debugPort = common.PORT;
var args = ['--debug-port=' + debugPort];
var args = ['--interactive', '--debug-port=' + debugPort];
var childOptions = { stdio: ['pipe', 'pipe', 'pipe', 'ipc'] };
var child = spawn(process.execPath, args, childOptions);

child.stdin.end("process.send({ msg: 'childready' });");
child.stdin.write("process.send({ msg: 'childready' });\n");

child.stderr.on('data', function(data) {
var lines = data.toString().replace(/\r/g, '').trim().split('\n');
Expand All @@ -43,6 +43,7 @@ child.on('message', function onChildMsg(message) {

process.on('exit', function() {
child.kill();
assertOutputLines();
});

var outputLines = [];
Expand All @@ -51,7 +52,6 @@ function processStderrLine(line) {
outputLines.push(line);

if (/Debugger listening/.test(line)) {
assertOutputLines();
process.exit();
}
}
Expand Down