mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
7b4cc58b70
PR-URL: https://github.com/nodejs/node/pull/46113 Fixes: https://github.com/nodejs/node/issues/46110 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
15 lines
385 B
JavaScript
15 lines
385 B
JavaScript
const assert = require('assert');
|
|
const inspector = require('inspector');
|
|
|
|
|
|
assert.strictEqual(inspector.url(), undefined);
|
|
inspector.open(0, undefined, false);
|
|
assert(inspector.url().startsWith('ws://'));
|
|
assert.throws(() => {
|
|
inspector.open(0, undefined, false);
|
|
}, {
|
|
code: 'ERR_INSPECTOR_ALREADY_ACTIVATED'
|
|
});
|
|
inspector.close();
|
|
assert.strictEqual(inspector.url(), undefined);
|