Skip to content

Commit

Permalink
fix: testNamePattern adds leading space (#6186)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio authored Jul 26, 2024
1 parent d4c005b commit 073a50c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/runner/src/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ export async function collectTests(

calculateSuiteHash(file)

file.tasks.forEach((task) => {
// task.suite refers to the internal default suite object
// it should not be reported
if (task.suite?.id === '') {
delete task.suite
}
})

const hasOnlyTasks = someTasksAreOnly(file)
interpretTaskModes(
file,
Expand All @@ -86,13 +94,6 @@ export async function collectTests(
config.allowOnly,
)

file.tasks.forEach((task) => {
// task.suite refers to the internal default suite object
// it should not be reported
if (task.suite?.id === '') {
delete task.suite
}
})
files.push(file)
}

Expand Down

0 comments on commit 073a50c

Please sign in to comment.