(dir, predicate)
| 24 | } |
| 25 | |
| 26 | function collectFilesRecursiveSorted(dir, predicate) { |
| 27 | const out = []; |
| 28 | |
| 29 | function walk(d) { |
| 30 | const entries = listDirSorted(d); |
| 31 | for (const name of entries) { |
| 32 | const full = join(d, name); |
| 33 | const st = statSync(full); |
| 34 | if (st.isDirectory()) { |
| 35 | walk(full); |
| 36 | continue; |
| 37 | } |
| 38 | if (predicate(full)) out.push(full); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | walk(dir); |
| 43 | out.sort(); |
| 44 | return out; |
| 45 | } |
| 46 | |
| 47 | function collectScriptTests(root) { |
| 48 | const dir = join(root, "scripts", "__tests__"); |
no test coverage detected