(todoTests, doneTests)
| 73 | } |
| 74 | |
| 75 | function getNextTest (todoTests, doneTests) { |
| 76 | for (const testCls of todoTests) { |
| 77 | let allPrereqsDone = true |
| 78 | for (const testTag of testCls.getPrereqs()) { |
| 79 | if (!doneTests.includes(testTag)) { |
| 80 | allPrereqsDone = false |
| 81 | break |
| 82 | } |
| 83 | } |
| 84 | if (allPrereqsDone) { |
| 85 | return testCls |
| 86 | } |
| 87 | } |
| 88 | return null |
| 89 | } |
| 90 | |
| 91 | async function runTests (options = {}) { |
| 92 | const { testsDir, config } = options |