(dir)
| 7 | const testRoot = join(root, "test"); |
| 8 | |
| 9 | function collectTests(dir) { |
| 10 | const out = []; |
| 11 | for (const entry of readdirSync(dir)) { |
| 12 | const full = join(dir, entry); |
| 13 | const stat = statSync(full); |
| 14 | if (stat.isDirectory()) { |
| 15 | out.push(...collectTests(full)); |
| 16 | continue; |
| 17 | } |
| 18 | if (entry.endsWith(".test.mjs")) { |
| 19 | out.push(relative(root, full)); |
| 20 | } |
| 21 | } |
| 22 | return out.sort(); |
| 23 | } |
| 24 | |
| 25 | const tests = collectTests(testRoot); |
| 26 | if (!tests.length) { |