File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/vitest/src/node/reporters/renderers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export class WindowRenderer {
30
30
private renderScheduled = false
31
31
32
32
private windowHeight = 0
33
+ private started = false
33
34
private finished = false
34
35
private cleanups : ( ( ) => void ) [ ] = [ ]
35
36
@@ -54,11 +55,10 @@ export class WindowRenderer {
54
55
this . flushBuffer ( )
55
56
this . stop ( )
56
57
} )
57
-
58
- this . start ( )
59
58
}
60
59
61
60
start ( ) : void {
61
+ this . started = true
62
62
this . finished = false
63
63
this . renderInterval = setInterval ( ( ) => this . schedule ( ) , this . options . interval ) . unref ( )
64
64
}
@@ -171,7 +171,7 @@ export class WindowRenderer {
171
171
// @ts -expect-error -- not sure how 2 overloads should be typed
172
172
stream . write = ( chunk , _ , callback ) => {
173
173
if ( chunk ) {
174
- if ( this . finished ) {
174
+ if ( this . finished || ! this . started ) {
175
175
this . write ( chunk . toString ( ) , type )
176
176
}
177
177
else {
You can’t perform that action at this time.
0 commit comments