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