Skip to content

Commit

Permalink
test: remove common.skipIfInspectorEnabled()
Browse files Browse the repository at this point in the history
common.skipIfInspectorEnabled() is only used once in all of the tests.
The test is more clear (in my opinion, at least) without the abstraction
so put the check directly in the test. Additionally, it honestly looks
like an error (which is how I noticed it in the first place) and that
someone mistyped the far more common skipIfInspectorDisabled().

PR-URL: #29993
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
Trott authored and targos committed Nov 10, 2019
1 parent d9b5508 commit 9fed62f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 0 additions & 7 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,6 @@ function skipIfInspectorDisabled() {
}
}

function skipIfInspectorEnabled() {
if (process.features.inspector) {
skip('V8 inspector is enabled');
}
}

function skipIfReportDisabled() {
if (!process.config.variables.node_report) {
skip('Diagnostic reporting is disabled');
Expand Down Expand Up @@ -789,7 +783,6 @@ module.exports = {
skipIf32Bits,
skipIfEslintMissing,
skipIfInspectorDisabled,
skipIfInspectorEnabled,
skipIfReportDisabled,
skipIfWorker,

Expand Down
4 changes: 3 additions & 1 deletion test/parallel/test-coverage-with-inspector-disabled.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
'use strict';

const common = require('../common');
common.skipIfInspectorEnabled();
if (process.features.inspector) {
common.skip('V8 inspector is enabled');
}

const fixtures = require('../common/fixtures');
const assert = require('assert');
Expand Down

0 comments on commit 9fed62f

Please sign in to comment.