summaryrefslogtreecommitdiff
path: root/test/parallel/test-debugger-breakpoint-exists.js
blob: 872fad2d82400cf2ec034b12251ecf2dc335f068 (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
'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(['--port=0', script]);

(async () => {
  try {
    await cli.waitForInitialBreak();
    await cli.waitForPrompt();
    await cli.command('setBreakpoint(1)');
    await cli.command('setBreakpoint(1)');
    await cli.waitFor(/Breakpoint at specified location already exists/);
  } finally {
    await cli.quit();
  }
})().then(common.mustCall());