(files: File[], errors: unknown[])
| 773 | } |
| 774 | |
| 775 | private printErrorsSummary(files: File[], errors: unknown[]) { |
| 776 | const suites = getSuites(files) |
| 777 | const tests = getTests(files) |
| 778 | |
| 779 | const failedSuites = suites.filter(i => i.result?.errors) |
| 780 | const failedTests = tests.filter(i => i.result?.state === 'fail') |
| 781 | const failedTotal = countTestErrors(failedSuites) + countTestErrors(failedTests) |
| 782 | |
| 783 | // TODO: error divider should take into account merged errors for counting |
| 784 | let current = 1 |
| 785 | const errorDivider = () => this.error(`${c.red(c.dim(divider(`[${current++}/${failedTotal}]`, undefined, 1)))}\n`) |
| 786 | |
| 787 | if (failedSuites.length) { |
| 788 | this.error(`\n${errorBanner(`Failed Suites ${failedSuites.length}`)}\n`) |
| 789 | this.printTaskErrors(failedSuites, errorDivider) |
| 790 | } |
| 791 | |
| 792 | if (failedTests.length) { |
| 793 | this.error(`\n${errorBanner(`Failed Tests ${failedTests.length}`)}\n`) |
| 794 | this.printTaskErrors(failedTests, errorDivider) |
| 795 | } |
| 796 | |
| 797 | if (errors.length) { |
| 798 | this.ctx.logger.printUnhandledErrors(errors) |
| 799 | this.error() |
| 800 | } |
| 801 | } |
| 802 | |
| 803 | private printLeaksSummary() { |
| 804 | const leaks = this.ctx.state.leakSet |
nothing calls this directly
no test coverage detected