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.
  • Loading branch information
Trott committed Aug 10, 2018
1 parent 7b1f3a4 commit fd39bbb
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 @@ -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');

Expand Down Expand Up @@ -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;
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 fd39bbb

Please sign in to comment.