File tree 1 file changed +7
-8
lines changed
packages/vitest/src/runtime/runners 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -27,16 +27,15 @@ export class VitestTestRunner implements VitestRunner {
27
27
this . snapshotClient . clear ( )
28
28
}
29
29
30
- async onAfterRunFiles ( ) {
31
- // TOOD: should do `finishCurrentRun` in onAfterRunSuite with suite.filepath?
32
- const result = await this . snapshotClient . finishCurrentRun ( )
33
- if ( result )
34
- await rpc ( ) . snapshotSaved ( result )
35
- }
36
-
37
- onAfterRunSuite ( suite : Suite ) {
30
+ async onAfterRunSuite ( suite : Suite ) {
38
31
if ( this . config . logHeapUsage && typeof process !== 'undefined' )
39
32
suite . result ! . heap = process . memoryUsage ( ) . heapUsed
33
+
34
+ if ( suite . mode !== 'skip' && typeof suite . filepath !== 'undefined' ) {
35
+ const result = await this . snapshotClient . finishCurrentRun ( )
36
+ if ( result )
37
+ await rpc ( ) . snapshotSaved ( result )
38
+ }
40
39
}
41
40
42
41
onAfterRunTask ( test : Test ) {
You can’t perform that action at this time.
0 commit comments