Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Member

@jasnell jasnell Aug 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could likely be modified to simply attempt to require('trace_events'), which will throw if tracing is not enabled...

let trace_events;
try {
  trace_events = require('trace_events');
} catch (err) {
  common.skip('missing trace events');
}
// ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't oppose such a modification, but if given the choice, I'd prefer to keep this a simple migrate-the-existing-thing-into-the-one-test-that-uses-it and have any modifications to the-existing-thing happen in a subsequent PR.

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