mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
This adds test coverage to `unpackError()` in `lib/internal/debugger/inspect_client.js`. That function previously was untested. PR-URL: https://github.com/nodejs/node/pull/39570 Refs: https://github.com/nodejs/node-inspect/issues/101 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
28 lines
718 B
JavaScript
28 lines
718 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const fixtures = require('../common/fixtures');
|
|
const startCLI = require('../common/debugger');
|
|
|
|
// Test for "Breakpoint at specified location already exists" error.
|
|
{
|
|
const script = fixtures.path('debugger', 'three-lines.js');
|
|
const cli = startCLI([script]);
|
|
|
|
function onFatal(error) {
|
|
cli.quit();
|
|
throw error;
|
|
}
|
|
|
|
cli.waitForInitialBreak()
|
|
.then(() => cli.waitForPrompt())
|
|
.then(() => cli.command('setBreakpoint(1)'))
|
|
.then(() => cli.command('setBreakpoint(1)'))
|
|
.then(() => cli.waitFor(/Breakpoint at specified location already exists/))
|
|
.then(() => cli.quit())
|
|
.then(null, onFatal);
|
|
}
|