inspector: allow opening inspector when `NODE_V8_COVERAGE` is set · nodejs/node@d437025 · GitHub
Skip to content

Commit d437025

Browse files
MoLowruyadorno
authored andcommitted
inspector: allow opening inspector when NODE_V8_COVERAGE is set
PR-URL: #46113 Fixes: #46110 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 232bdd5 commit d437025

3 files changed

Lines changed: 36 additions & 1 deletion

File tree

src/inspector_js_api.cc

Lines changed: 1 addition & 1 deletion

test/fixtures/inspector-open.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const assert = require('assert');
2+
const inspector = require('inspector');
3+
4+
5+
assert.strictEqual(inspector.url(), undefined);
6+
inspector.open(0, undefined, false);
7+
assert(inspector.url().startsWith('ws://'));
8+
assert.throws(() => {
9+
inspector.open(0, undefined, false);
10+
}, {
11+
code: 'ERR_INSPECTOR_ALREADY_ACTIVATED'
12+
});
13+
inspector.close();
14+
assert.strictEqual(inspector.url(), undefined);
Lines changed: 21 additions & 0 deletions

0 commit comments

Comments
 (0)