From 5cfab145a17a5769862214d3a898aeec57267d6a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 10 Aug 2018 13:00:10 -0700 Subject: [PATCH] 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 Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Trivikram Kamat Reviewed-By: George Adams Reviewed-By: Luigi Pinca --- test/common/index.js | 7 ------- test/parallel/test-trace-events-api.js | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/test/common/index.js b/test/common/index.js index 0884e819683c87..8b1001e7e5ec77 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -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'); @@ -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; diff --git a/test/parallel/test-trace-events-api.js b/test/parallel/test-trace-events-api.js index 44193cec0e2bb3..f7d7ec35b022f6 100644 --- a/test/parallel/test-trace-events-api.js +++ b/test/parallel/test-trace-events-api.js @@ -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');