Skip to content

Commit 073a50c

Browse files
authoredJul 26, 2024··
fix: testNamePattern adds leading space (#6186)
1 parent d4c005b commit 073a50c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed
 

‎packages/runner/src/collect.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ export async function collectTests(
7777

7878
calculateSuiteHash(file)
7979

80+
file.tasks.forEach((task) => {
81+
// task.suite refers to the internal default suite object
82+
// it should not be reported
83+
if (task.suite?.id === '') {
84+
delete task.suite
85+
}
86+
})
87+
8088
const hasOnlyTasks = someTasksAreOnly(file)
8189
interpretTaskModes(
8290
file,
@@ -86,13 +94,6 @@ export async function collectTests(
8694
config.allowOnly,
8795
)
8896

89-
file.tasks.forEach((task) => {
90-
// task.suite refers to the internal default suite object
91-
// it should not be reported
92-
if (task.suite?.id === '') {
93-
delete task.suite
94-
}
95-
})
9697
files.push(file)
9798
}
9899

0 commit comments

Comments
 (0)
Please sign in to comment.