node/test/parallel/test-inspector-open-coverage.js
Moshe Atlow 7b4cc58b70
inspector: allow opening inspector when NODE_V8_COVERAGE is set
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>
2023-01-29 21:46:36 +00:00

22 lines
601 B
JavaScript

'use strict';
const common = require('../common');
const assert = require('assert');
const { spawnSync } = require('child_process');
const fixtures = require('../common/fixtures');
const tmpdir = require('../common/tmpdir');
common.skipIfInspectorDisabled();
common.skipIfWorker();
tmpdir.refresh();
let output = spawnSync(process.execPath, [fixtures.path('inspector-open.js')]);
assert.strictEqual(output.status, 0);
output = spawnSync(process.execPath, [fixtures.path('inspector-open.js')], {
env: { ...process.env, NODE_V8_COVERAGE: tmpdir.path },
});
assert.strictEqual(output.status, 0);