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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Oct 23, 2019
1 parent ff4f299 commit c096f25
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 c096f25

Please sign in to comment.