/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v20.20.1
test/sequential/test-debugger-invalid-args.js
27 строк
695 B
Debadree Chatterjee
lib,src: update exit codes as per todos
26 фев 2023, 20:03
Не верифицирован
26 фев 2023, 20:03
5b5898a
Код
Авторство
О чём код?
'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());