mirror of
https://github.com/nodejs/node.git
synced 2025-05-01 08:42:45 +00:00

Move test case that does not require a predetermined port to parallel. PR-URL: https://github.com/nodejs/node/pull/39300 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
32 lines
661 B
JavaScript
32 lines
661 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const startCLI = require('../common/debugger');
|
|
|
|
const assert = require('assert');
|
|
|
|
// Launch CLI w/o args.
|
|
{
|
|
const cli = startCLI([]);
|
|
cli.quit()
|
|
.then((code) => {
|
|
assert.strictEqual(code, 1);
|
|
assert.match(cli.output, /^Usage:/, 'Prints usage info');
|
|
});
|
|
}
|
|
|
|
// Launch w/ invalid host:port.
|
|
{
|
|
const cli = startCLI([`localhost:${common.PORT}`]);
|
|
cli.quit()
|
|
.then((code) => {
|
|
assert.match(
|
|
cli.output,
|
|
/failed to connect/,
|
|
'Tells the user that the connection failed');
|
|
assert.strictEqual(code, 1);
|
|
});
|
|
}
|