blob: a0c42cac4d466a1cdd67b3fd500500f8a2d8ee2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const startCLI = require('../common/debugger');
const assert = require('assert');
// Launch CLI w/o args.
(async () => {
const cli = startCLI([]);
const code = await cli.quit();
assert.strictEqual(code, 9);
assert.match(cli.output, /^Usage:/, 'Prints usage info');
})().then(common.mustCall());
// Launch w/ invalid host:port.
(async () => {
const cli = startCLI([`localhost:${common.PORT}`]);
const code = await cli.quit();
assert.match(
cli.output,
/failed to connect/,
'Tells the user that the connection failed');
assert.strictEqual(code, 1);
})().then(common.mustCall());
|