(dir, predicate)
| 39 | } |
| 40 | |
| 41 | function collectFilesRecursiveSorted(dir, predicate) { |
| 42 | const out = []; |
| 43 | |
| 44 | function walk(d) { |
| 45 | const entries = listDirSorted(d); |
| 46 | for (const name of entries) { |
| 47 | const full = join(d, name); |
| 48 | const st = statSync(full); |
| 49 | if (st.isDirectory()) { |
| 50 | walk(full); |
| 51 | continue; |
| 52 | } |
| 53 | if (predicate(full)) out.push(full); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | walk(dir); |
| 58 | out.sort(); |
| 59 | return out; |
| 60 | } |
| 61 | |
| 62 | function collectPackageE2eTests(root) { |
| 63 | const packagesDir = join(root, "packages"); |
no test coverage detected