mirror of
https://github.com/nodejs/node.git
synced 2025-05-16 04:04:17 +00:00

Squashed from: - deps: Add node-inspect 1.10.1 This adds a reimplementation of the old CLI debugger (`node debug`) against the new debugger protocol (`node --inspect`). This is necessary because the old protocol won't be supported in future versions of V8. - deps: Update node-inspect to 1.10.2 Starting with 1.10.2 the test suite should pass consistently on windows. - deps: Update to node-inspect 1.10.4 PR-URL: https://github.com/nodejs/node/pull/10187 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
26 lines
643 B
JavaScript
26 lines
643 B
JavaScript
'use strict';
|
|
const { test } = require('tap');
|
|
|
|
const startCLI = require('./start-cli');
|
|
|
|
test('launch CLI w/o args', (t) => {
|
|
const cli = startCLI([]);
|
|
return cli.quit()
|
|
.then((code) => {
|
|
t.equal(code, 1, 'exits with non-zero exit code');
|
|
t.match(cli.output, /^Usage:/, 'Prints usage info');
|
|
});
|
|
});
|
|
|
|
test('launch w/ invalid host:port', (t) => {
|
|
const cli = startCLI(['localhost:914']);
|
|
return cli.quit()
|
|
.then((code) => {
|
|
t.match(
|
|
cli.output,
|
|
'failed to connect',
|
|
'Tells the user that the connection failed');
|
|
t.equal(code, 1, 'exits with non-zero exit code');
|
|
});
|
|
});
|