xref: /third_party/node/test/parallel/test-debugger-breakpoint-exists.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ciconst common = require('../common');
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_cicommon.skipIfInspectorDisabled();
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ciconst fixtures = require('../common/fixtures');
81cb0ef41Sopenharmony_ciconst startCLI = require('../common/debugger');
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ci// Test for "Breakpoint at specified location already exists" error.
111cb0ef41Sopenharmony_ciconst script = fixtures.path('debugger', 'three-lines.js');
121cb0ef41Sopenharmony_ciconst cli = startCLI(['--port=0', script]);
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_ci(async () => {
151cb0ef41Sopenharmony_ci  try {
161cb0ef41Sopenharmony_ci    await cli.waitForInitialBreak();
171cb0ef41Sopenharmony_ci    await cli.waitForPrompt();
181cb0ef41Sopenharmony_ci    await cli.command('setBreakpoint(1)');
191cb0ef41Sopenharmony_ci    await cli.command('setBreakpoint(1)');
201cb0ef41Sopenharmony_ci    await cli.waitFor(/Breakpoint at specified location already exists/);
211cb0ef41Sopenharmony_ci  } finally {
221cb0ef41Sopenharmony_ci    await cli.quit();
231cb0ef41Sopenharmony_ci  }
241cb0ef41Sopenharmony_ci})().then(common.mustCall());
25

Indexes created Thu Nov 07 10:32:03 CST 2024