mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
* Use cleaner `process.stdin.write('.exit')` to exit the process rather
than `proc.kill()`.
* Move test to sequential. It uses the default port 9229. It will fail
if another inspector test (or test using port 0) is already using that
port. So it needs to be run sequentially rather than in parallel with
other tests. (We haven't seen many failures with it yet because there
aren't a lot of other inspector tests in parallel at this time.)
PR-URL: https://github.com/nodejs/node/pull/15141
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
16 lines
366 B
JavaScript
16 lines
366 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
common.skipIfInspectorDisabled();
|
|
const spawn = require('child_process').spawn;
|
|
|
|
const proc = spawn(process.execPath, ['inspect', 'foo']);
|
|
proc.stdout.setEncoding('utf8');
|
|
|
|
let output = '';
|
|
proc.stdout.on('data', (data) => {
|
|
output += data;
|
|
if (output.includes('debug> '))
|
|
proc.stdin.write('.exit\n');
|
|
});
|