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