node/test/parallel/test-inspector-already-activated-cli.js
Rich Trott 76f86c3ed4 test: move test-inspector-already-activated-cli to parallel
There doesn't seem to be a reason for this test to have to stay in
sequential. It appears to have been placed there out of caution.

PR-URL: https://github.com/nodejs/node/pull/34755
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-08-18 07:23:18 -07:00

20 lines
495 B
JavaScript

// Flags: --inspect=0
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
common.skipIfWorker();
const assert = require('assert');
const inspector = require('inspector');
const wsUrl = inspector.url();
assert(wsUrl.startsWith('ws://'));
assert.throws(() => {
inspector.open(0, undefined, false);
}, {
code: 'ERR_INSPECTOR_ALREADY_ACTIVATED'
});
assert.strictEqual(inspector.url(), wsUrl);
inspector.close();
assert.strictEqual(inspector.url(), undefined);