diff --git a/packages/runner/src/utils/tasks.ts b/packages/runner/src/utils/tasks.ts index d692a7995494..8ed37bc5a1b2 100644 --- a/packages/runner/src/utils/tasks.ts +++ b/packages/runner/src/utils/tasks.ts @@ -14,10 +14,14 @@ export function getTests(suite: Arrayable): (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) + } } } } diff --git a/packages/ui/client/composables/summary.ts b/packages/ui/client/composables/summary.ts index c1eea9d6e02f..8e01a69dc2ed 100644 --- a/packages/ui/client/composables/summary.ts +++ b/packages/ui/client/composables/summary.ts @@ -68,10 +68,13 @@ function getTests(suite: Arrayable): (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) + } } } }