Skip to content
Permalink
Browse files

test: remove common.skipIfInspectorEnabled()

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 Oct 16, 2019
1 parent d9b5508 commit 9fed62f7cba3465f3fff0fd7a3e0b2e67c6f481c
Showing with 3 additions and 8 deletions.
  1. +0 −7 test/common/index.js
  2. +3 −1 test/parallel/test-coverage-with-inspector-disabled.js
@@ -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');
@@ -789,7 +783,6 @@ module.exports = {
skipIf32Bits,
skipIfEslintMissing,
skipIfInspectorDisabled,
skipIfInspectorEnabled,
skipIfReportDisabled,
skipIfWorker,

@@ -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');

0 comments on commit 9fed62f

Please sign in to comment.
You can’t perform that action at this time.