(root: string, subdir = '')
| 81 | } |
| 82 | |
| 83 | export function loadTests(root: string, subdir = ''): LoadResult { |
| 84 | // allow a single .m file as the subdir |
| 85 | if (subdir.endsWith('.m') && fs.statSync(path.join(root, subdir)).isFile()) |
| 86 | return loadTestFile(root, subdir); |
| 87 | const problems: Problem[] = []; |
| 88 | const errors: LoadResult['errors'] = []; |
| 89 | for (const file of listTestFiles(root, subdir)) { |
| 90 | const r = loadTestFile(root, file); |
| 91 | problems.push(...r.problems); |
| 92 | errors.push(...r.errors); |
| 93 | } |
| 94 | return { problems, errors }; |
| 95 | } |
no test coverage detected