Skip to content

Commit 726c357

Browse files
committed
test_runner: remove root tracking set
The wasRootSetup Set in the test harness appears to be redundant, since the startTime field can be used interchangeably. This commit removes wasRootSetup.
1 parent 7e6bc93 commit 726c357

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/internal/test_runner/harness.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const {
2626
const { bigint: hrtime } = process.hrtime;
2727

2828
const testResources = new SafeMap();
29-
const wasRootSetup = new SafeWeakSet();
3029

3130
function createTestTree(options = kEmptyObject) {
3231
return setup(new Test({ __proto__: null, ...options, name: '<root>' }));
@@ -105,7 +104,7 @@ function collectCoverage(rootTest, coverage) {
105104
}
106105

107106
function setup(root) {
108-
if (wasRootSetup.has(root)) {
107+
if (root.startTime !== null) {
109108
return root;
110109
}
111110

@@ -164,8 +163,6 @@ function setup(root) {
164163
}
165164

166165
root.startTime = hrtime();
167-
168-
wasRootSetup.add(root);
169166
return root;
170167
}
171168

0 commit comments

Comments
 (0)