Skip to content

Commit

Permalink
fix: add task tests iteratively (#5235)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerYeger authored Feb 20, 2024
1 parent e685b76 commit 3815554
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 7 additions & 3 deletions packages/runner/src/utils/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ export function getTests(suite: Arrayable<Task>): (Test | Custom)[] {
}
else {
for (const task of s.tasks) {
if (isAtomTest(task))
if (isAtomTest(task)) {
tests.push(task)
else
tests.push(...getTests(task))
}
else {
const taskTests = getTests(task)
for (const test of taskTests)
tests.push(test)
}
}
}
}
Expand Down
9 changes: 6 additions & 3 deletions packages/ui/client/composables/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@ function getTests(suite: Arrayable<Task>): (Test | Custom)[] {
}
else {
for (const task of s.tasks) {
if (isAtomTest(task))
if (isAtomTest(task)) {
tests.push(task)
else
tests.push(...getTests(task))
}
else {
const taskTests = getTests(task)
for (const test of taskTests) tests.push(test)
}
}
}
}
Expand Down

0 comments on commit 3815554

Please sign in to comment.