mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
11b8b99ce4
PR-URL: https://github.com/nodejs/node/pull/44680 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
29 lines
758 B
JavaScript
29 lines
758 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const fixtures = require('../common/fixtures');
|
|
const startCLI = require('../common/debugger');
|
|
|
|
const assert = require('assert');
|
|
|
|
// Custom port.
|
|
const script = fixtures.path('debugger', 'three-lines.js');
|
|
|
|
const cli = startCLI([`--port=${common.PORT}`, script]);
|
|
(async function() {
|
|
try {
|
|
await cli.waitForInitialBreak();
|
|
await cli.waitForPrompt();
|
|
assert.match(cli.output, /debug>/, 'prints a prompt');
|
|
assert.match(
|
|
cli.output,
|
|
new RegExp(`< Debugger listening on [^\n]*${common.PORT}`),
|
|
'forwards child output');
|
|
} finally {
|
|
const code = await cli.quit();
|
|
assert.strictEqual(code, 0);
|
|
}
|
|
})().then(common.mustCall());
|