From c096f251e46884d3809b00200662bd7363566d70 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 16 Oct 2019 09:39:14 -0700 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/29993 Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Gireesh Punathil --- test/common/index.js | 7 ------- test/parallel/test-coverage-with-inspector-disabled.js | 4 +++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/test/common/index.js b/test/common/index.js index 00ebd283a0c3e9..98a26872223cb9 100644 --- a/test/common/index.js +++ b/test/common/index.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, diff --git a/test/parallel/test-coverage-with-inspector-disabled.js b/test/parallel/test-coverage-with-inspector-disabled.js index 0b0c2aea43fa60..f2ba070859527e 100644 --- a/test/parallel/test-coverage-with-inspector-disabled.js +++ b/test/parallel/test-coverage-with-inspector-disabled.js @@ -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');