diff --git a/lib/internal/test_runner/harness.js b/lib/internal/test_runner/harness.js index a5cec210df2f73..d1c4f0d391353d 100644 --- a/lib/internal/test_runner/harness.js +++ b/lib/internal/test_runner/harness.js @@ -26,7 +26,6 @@ const { const { bigint: hrtime } = process.hrtime; const testResources = new SafeMap(); -const wasRootSetup = new SafeWeakSet(); function createTestTree(options = kEmptyObject) { return setup(new Test({ __proto__: null, ...options, name: '' })); @@ -105,7 +104,7 @@ function collectCoverage(rootTest, coverage) { } function setup(root) { - if (wasRootSetup.has(root)) { + if (root.startTime !== null) { return root; } @@ -164,8 +163,6 @@ function setup(root) { } root.startTime = hrtime(); - - wasRootSetup.add(root); return root; }