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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Rich Trott 2018-08-10 13:00:10 -07:00
parent c7944a7a7b
commit c75c917823
2 changed files with 1 additions and 8 deletions

View File

@ -29,7 +29,6 @@ const os = require('os');
const { exec, execSync, spawn, spawnSync } = require('child_process');
const stream = require('stream');
const util = require('util');
const { hasTracing } = process.binding('config');
const { fixturesDir } = require('./fixtures');
const tmpdir = require('./tmpdir');
@ -226,12 +225,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;

View File

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