Skip to content

Commit c75c917

Browse files
committed
test: remove common.hasTracing
`common.hasTracing` is only used in one place. `common` is bloated so let's move that to the one test that uses it. `hasTracing` is undocumented so there's no need to remove it from the README file as it's not there in the first place. Similarly, it's not included in the .mjs version of the `common` file. PR-URL: #22250 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent c7944a7 commit c75c917

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

test/common/index.js

-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const os = require('os');
2929
const { exec, execSync, spawn, spawnSync } = require('child_process');
3030
const stream = require('stream');
3131
const util = require('util');
32-
const { hasTracing } = process.binding('config');
3332
const { fixturesDir } = require('./fixtures');
3433
const tmpdir = require('./tmpdir');
3534

@@ -226,12 +225,6 @@ Object.defineProperty(exports, 'hasCrypto', {
226225
}
227226
});
228227

229-
Object.defineProperty(exports, 'hasTracing', {
230-
get: function() {
231-
return Boolean(hasTracing);
232-
}
233-
});
234-
235228
Object.defineProperty(exports, 'hasFipsCrypto', {
236229
get: function() {
237230
return exports.hasCrypto && require('crypto').fips;

test/parallel/test-trace-events-api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
const common = require('../common');
55

6-
if (!common.hasTracing)
6+
if (!process.binding('config').hasTracing)
77
common.skip('missing trace events');
88
if (!common.isMainThread)
99
common.skip('process.chdir is not available in Workers');

0 commit comments

Comments
 (0)