(ctx: Vitest, files: TestModule[], options: CliOptions)
| 188 | } |
| 189 | |
| 190 | export function processCollected(ctx: Vitest, files: TestModule[], options: CliOptions): void { |
| 191 | let errorsPrinted = false |
| 192 | |
| 193 | forEachSuite(files, (suite) => { |
| 194 | suite.errors().forEach((error) => { |
| 195 | errorsPrinted = true |
| 196 | ctx.logger.printError(error, { |
| 197 | project: suite.project, |
| 198 | }) |
| 199 | }) |
| 200 | }) |
| 201 | |
| 202 | if (errorsPrinted) { |
| 203 | return |
| 204 | } |
| 205 | |
| 206 | if (typeof options.json !== 'undefined') { |
| 207 | return processJsonOutput(files, options) |
| 208 | } |
| 209 | |
| 210 | return formatCollectedAsString(files).forEach(test => console.log(test)) |
| 211 | } |
| 212 | |
| 213 | export function outputFileList(files: TestSpecification[], options: CliOptions): void { |
| 214 | if (typeof options.json !== 'undefined') { |
no test coverage detected