Skip to content

Commit

Permalink
test: remove common.hasTracing
Browse files Browse the repository at this point in the history
`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>
  • Loading branch information
Trott authored and targos committed Sep 3, 2018
1 parent 03b8258 commit 5cfab14
Show file tree
Hide file tree
Showing 2 changed files with 1 addition 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 @@ -30,7 +30,6 @@ const { exec, execSync, spawn, spawnSync } = require('child_process');
const stream = require('stream');
const util = require('util');
const Timer = process.binding('timer_wrap').Timer;
const { hasTracing } = process.binding('config');
const { fixturesDir } = require('./fixtures');
const tmpdir = require('./tmpdir');

Expand Down Expand Up @@ -227,12 +226,6 @@ Object.defineProperty(exports, 'hasCrypto', {
}
});

Object.defineProperty(exports, 'hasTracing', {
get: function() {
return Boolean(hasTracing);
}
});

Object.defineProperty(exports, 'hasFipsCrypto', {
get: function() {
return exports.hasCrypto && require('crypto').fips;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-trace-events-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

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

if (!common.hasTracing)
if (!process.binding('config').hasTracing)
common.skip('missing trace events');
if (!common.isMainThread)
common.skip('process.chdir is not available in Workers');
Expand Down

0 comments on commit 5cfab14

Please sign in to comment.