Skip to content

Commit c9e09fc

Browse files
committed
fixup! fixup! fixup! fixup! test,debugger: migrate node-inspect tests to core
1 parent 992ea72 commit c9e09fc

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

test/common/inspector-cli.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,14 @@ function isPreBreak(output) {
1616
function startCLI(args, flags = [], spawnOpts = {}) {
1717
const child =
1818
spawn(process.execPath, [...flags, 'inspect', ...args], spawnOpts);
19-
let isFirstStdoutChunk = true;
2019

2120
const outputBuffer = [];
2221
function bufferOutput(chunk) {
23-
if (isFirstStdoutChunk) {
24-
isFirstStdoutChunk = false;
25-
outputBuffer.push(chunk.replace(/^debug>\s*/, ''));
26-
} else {
27-
outputBuffer.push(chunk);
28-
}
22+
outputBuffer.push(chunk);
2923
}
3024

3125
function getOutput() {
32-
return outputBuffer.join('').toString()
33-
.replace(/^[^\n]*?[\b]/mg, '');
26+
return outputBuffer.join('\n').replaceAll('\b', '');
3427
}
3528

3629
child.stdout.setEncoding('utf8');

0 commit comments

Comments
 (0)