mirror of
https://github.com/nodejs/node.git
synced 2024-11-25 08:19:38 +01:00
3ef3501e49
Migrate the node-inspect tests to core (where node-inspect code now lives) and remove node-inspect from deps directory. PR-URL: https://github.com/nodejs/node/pull/38161 Refs: https://github.com/nodejs/node/discussions/36481 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
31 lines
713 B
JavaScript
31 lines
713 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const fixtures = require('../common/fixtures');
|
|
const startCLI = require('../common/inspector-cli');
|
|
|
|
const assert = require('assert');
|
|
|
|
// Random port.
|
|
{
|
|
const script = fixtures.path('inspector-cli', 'three-lines.js');
|
|
|
|
const cli = startCLI(['--port=0', script]);
|
|
|
|
cli.waitForInitialBreak()
|
|
.then(() => cli.waitForPrompt())
|
|
.then(() => {
|
|
assert.match(cli.output, /debug>/, 'prints a prompt');
|
|
assert.match(
|
|
cli.output,
|
|
/< Debugger listening on /,
|
|
'forwards child output');
|
|
})
|
|
.then(() => cli.quit())
|
|
.then((code) => {
|
|
assert.strictEqual(code, 0);
|
|
});
|
|
}
|