(files: File[], runner: VitestRunner)
| 1007 | } |
| 1008 | |
| 1009 | export async function runFiles(files: File[], runner: VitestRunner): Promise<void> { |
| 1010 | limitMaxConcurrency ??= limitConcurrency(runner.config.maxConcurrency) |
| 1011 | |
| 1012 | for (const file of files) { |
| 1013 | if (!file.tasks.length && !runner.config.passWithNoTests) { |
| 1014 | if (!file.result?.errors?.length) { |
| 1015 | const error = processError( |
| 1016 | new Error(`No test suite found in file ${file.filepath}`), |
| 1017 | ) |
| 1018 | file.result = { |
| 1019 | state: 'fail', |
| 1020 | errors: [error], |
| 1021 | } |
| 1022 | } |
| 1023 | } |
| 1024 | await runner.trace!( |
| 1025 | 'run.spec', |
| 1026 | { |
| 1027 | 'code.file.path': file.filepath, |
| 1028 | 'vitest.suite.tasks.length': file.tasks.length, |
| 1029 | }, |
| 1030 | () => runSuite(file, runner), |
| 1031 | ) |
| 1032 | } |
| 1033 | } |
| 1034 | |
| 1035 | const workerRunners = new WeakSet<VitestRunner>() |
| 1036 |
no test coverage detected