Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 069ff1c

Browse filesBrowse files
cjihrigtargos
authored andcommitted
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. PR-URL: #46961 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 4b7198c commit 069ff1c
Copy full SHA for 069ff1c

File tree

Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed
Open diff view settings
Collapse file

‎lib/internal/test_runner/harness.js‎

Copy file name to clipboardExpand all lines: lib/internal/test_runner/harness.js
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
const {
33
ArrayPrototypeForEach,
44
SafeMap,
5-
SafeWeakSet,
65
} = primordials;
76
const {
87
createHook,
@@ -25,7 +24,6 @@ const {
2524
const { bigint: hrtime } = process.hrtime;
2625

2726
const testResources = new SafeMap();
28-
const wasRootSetup = new SafeWeakSet();
2927

3028
function createTestTree(options = kEmptyObject) {
3129
return setup(new Test({ __proto__: null, ...options, name: '<root>' }));
@@ -104,7 +102,7 @@ function collectCoverage(rootTest, coverage) {
104102
}
105103

106104
function setup(root) {
107-
if (wasRootSetup.has(root)) {
105+
if (root.startTime !== null) {
108106
return root;
109107
}
110108

@@ -168,8 +166,6 @@ function setup(root) {
168166
coverage: null,
169167
};
170168
root.startTime = hrtime();
171-
172-
wasRootSetup.add(root);
173169
return root;
174170
}
175171

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.