(suite: Arrayable<Task>)
| 7 | } |
| 8 | |
| 9 | export function getTests(suite: Arrayable<Task>): Test[] { |
| 10 | const tests: Test[] = [] |
| 11 | const arraySuites = toArray(suite) |
| 12 | for (const s of arraySuites) { |
| 13 | if (isTestCase(s)) { |
| 14 | tests.push(s) |
| 15 | } |
| 16 | else { |
| 17 | for (const task of s.tasks) { |
| 18 | if (isTestCase(task)) { |
| 19 | tests.push(task) |
| 20 | } |
| 21 | else { |
| 22 | const taskTests = getTests(task) |
| 23 | for (const test of taskTests) { |
| 24 | tests.push(test) |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | } |
| 30 | return tests |
| 31 | } |
| 32 | |
| 33 | export function getTasks(tasks: Arrayable<Task> = []): Task[] { |
| 34 | return toArray(tasks).flatMap(s => |
no test coverage detected