@internal
(file: File)
| 654 | |
| 655 | /** @internal */ |
| 656 | public async _reportFileTask(file: File): Promise<void> { |
| 657 | const project = this.getProjectByName(file.projectName || '') |
| 658 | await this._testRun.enqueued(project, file).catch((error) => { |
| 659 | this.state.catchError(serializeValue(error), 'Unhandled Reporter Error') |
| 660 | }) |
| 661 | await this._testRun.collected(project, [file]).catch((error) => { |
| 662 | this.state.catchError(serializeValue(error), 'Unhandled Reporter Error') |
| 663 | }) |
| 664 | |
| 665 | const logs: UserConsoleLog[] = [] |
| 666 | |
| 667 | const { packs, events } = convertTasksToEvents(file, (task) => { |
| 668 | if (task.logs) { |
| 669 | logs.push(...task.logs) |
| 670 | } |
| 671 | }) |
| 672 | |
| 673 | logs.sort((log1, log2) => log1.time - log2.time) |
| 674 | |
| 675 | for (const log of logs) { |
| 676 | await this._testRun.log(log).catch((error) => { |
| 677 | this.state.catchError(serializeValue(error), 'Unhandled Reporter Error') |
| 678 | }) |
| 679 | } |
| 680 | |
| 681 | await this._testRun.updated(packs, events).catch((error) => { |
| 682 | this.state.catchError(serializeValue(error), 'Unhandled Reporter Error') |
| 683 | }) |
| 684 | } |
| 685 | |
| 686 | async collect(filters?: string[], options?: { staticParse?: boolean; staticParseConcurrency?: number }): Promise<TestRunResult> { |
| 687 | return this._traces.$('vitest.collect', async (collectSpan) => { |
no test coverage detected