Skip to content

Commit 3815554

Browse files
authoredFeb 20, 2024··
fix: add task tests iteratively (#5235)
1 parent e685b76 commit 3815554

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed
 

‎packages/runner/src/utils/tasks.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ export function getTests(suite: Arrayable<Task>): (Test | Custom)[] {
1414
}
1515
else {
1616
for (const task of s.tasks) {
17-
if (isAtomTest(task))
17+
if (isAtomTest(task)) {
1818
tests.push(task)
19-
else
20-
tests.push(...getTests(task))
19+
}
20+
else {
21+
const taskTests = getTests(task)
22+
for (const test of taskTests)
23+
tests.push(test)
24+
}
2125
}
2226
}
2327
}

‎packages/ui/client/composables/summary.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,13 @@ function getTests(suite: Arrayable<Task>): (Test | Custom)[] {
6868
}
6969
else {
7070
for (const task of s.tasks) {
71-
if (isAtomTest(task))
71+
if (isAtomTest(task)) {
7272
tests.push(task)
73-
else
74-
tests.push(...getTests(task))
73+
}
74+
else {
75+
const taskTests = getTests(task)
76+
for (const test of taskTests) tests.push(test)
77+
}
7578
}
7679
}
7780
}

0 commit comments

Comments
 (0)
Please sign in to comment.