Skip to content

Commit 3252e0f

Browse files
committed
[vitest] Types
1 parent ddc26d3 commit 3252e0f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

test/vitest/reporter.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import {writeFile} from 'fs/promises';
2-
import {TestCase} from 'vitest/node';
2+
import {
3+
SerializedError,
4+
TestCase,
5+
TestModule,
6+
TestRunEndReason,
7+
} from 'vitest/node';
38
import {DefaultReporter} from 'vitest/reporters';
49

510
export default class extends DefaultReporter {
@@ -11,8 +16,12 @@ export default class extends DefaultReporter {
1116
super.onTestCaseResult(testCase);
1217
}
1318

14-
async onFinished() {
15-
super.onFinished();
19+
async onTestRunEnd(
20+
testModules: ReadonlyArray<TestModule>,
21+
unhandledErrors: ReadonlyArray<SerializedError>,
22+
reason: TestRunEndReason,
23+
) {
24+
super.onTestRunEnd(testModules, unhandledErrors, reason);
1625
this.ctx.logger.log(`\nTotal Assertions: ${this.assertions}`);
1726
await writeFile(
1827
'./tmp/counts.json',

0 commit comments

Comments
 (0)