xref: /third_party/node/test/parallel/test-inspector-already-activated-cli.js (revision 1cb0ef41)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci// Flags: --inspect=0
21cb0ef41Sopenharmony_ci'use strict';
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_ciconst common = require('../common');
51cb0ef41Sopenharmony_cicommon.skipIfInspectorDisabled();
61cb0ef41Sopenharmony_cicommon.skipIfWorker();
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_ciconst assert = require('assert');
91cb0ef41Sopenharmony_ciconst inspector = require('inspector');
101cb0ef41Sopenharmony_ciconst wsUrl = inspector.url();
111cb0ef41Sopenharmony_ciassert(wsUrl.startsWith('ws://'));
121cb0ef41Sopenharmony_ciassert.throws(() => {
131cb0ef41Sopenharmony_ci  inspector.open(0, undefined, false);
141cb0ef41Sopenharmony_ci}, {
151cb0ef41Sopenharmony_ci  code: 'ERR_INSPECTOR_ALREADY_ACTIVATED'
161cb0ef41Sopenharmony_ci});
171cb0ef41Sopenharmony_ciassert.strictEqual(inspector.url(), wsUrl);
181cb0ef41Sopenharmony_ciinspector.close();
191cb0ef41Sopenharmony_ciassert.strictEqual(inspector.url(), undefined);
20

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