Skip to content

Commit ec808b3

Browse files
dario-piotrowicztargos
authored andcommitted
test: use common.skipIfInspectorDisabled() to skip tests
some test files manually check for `!process.features.inspector` to see if the tests should be skipped, the changes here update those checks to instead use the more appropriate `common.skipIfInspectorDisabled()` PR-URL: #58675 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name>
1 parent b22e970 commit ec808b3

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

test/parallel/test-source-map-enable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
if (!process.features.inspector) return;
4-
53
const common = require('../common');
64
const assert = require('assert');
75
const { dirname } = require('path');
@@ -10,6 +8,8 @@ const path = require('path');
108
const { spawnSync } = require('child_process');
119
const { pathToFileURL } = require('url');
1210

11+
common.skipIfInspectorDisabled();
12+
1313
const tmpdir = require('../common/tmpdir');
1414
tmpdir.refresh();
1515

test/parallel/test-v8-coverage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
'use strict';
22

3-
if (!process.features.inspector) return;
4-
53
const common = require('../common');
64
const assert = require('assert');
75
const fs = require('fs');
86
const path = require('path');
97
const { spawnSync } = require('child_process');
108

9+
common.skipIfInspectorDisabled();
10+
1111
const tmpdir = require('../common/tmpdir');
1212
tmpdir.refresh();
1313

test/parallel/test-v8-stop-coverage.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
'use strict';
22

3-
if (!process.features.inspector) return;
4-
5-
require('../common');
3+
const common = require('../common');
64
const fixtures = require('../common/fixtures');
75
const tmpdir = require('../common/tmpdir');
86
const assert = require('assert');
97
const fs = require('fs');
108
const { spawnSync } = require('child_process');
119

10+
common.skipIfInspectorDisabled();
11+
1212
tmpdir.refresh();
1313
const intervals = 20;
1414

test/parallel/test-v8-take-coverage-noop.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
'use strict';
22

3-
if (!process.features.inspector) return;
4-
5-
require('../common');
3+
const common = require('../common');
64
const fixtures = require('../common/fixtures');
75
const tmpdir = require('../common/tmpdir');
86
const assert = require('assert');
97
const fs = require('fs');
108
const { spawnSync } = require('child_process');
119

10+
common.skipIfInspectorDisabled();
11+
1212
tmpdir.refresh();
1313

1414
// v8.takeCoverage() should be a noop if NODE_V8_COVERAGE is not set.

test/parallel/test-v8-take-coverage.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
'use strict';
22

3-
if (!process.features.inspector) return;
4-
5-
require('../common');
3+
const common = require('../common');
64
const fixtures = require('../common/fixtures');
75
const tmpdir = require('../common/tmpdir');
86
const assert = require('assert');
97
const fs = require('fs');
108
const { spawnSync } = require('child_process');
119

10+
common.skipIfInspectorDisabled();
11+
1212
tmpdir.refresh();
1313
const intervals = 40;
1414
// Outputs coverage when v8.takeCoverage() is invoked.

0 commit comments

Comments
 (0)