File tree 2 files changed +3
-5
lines changed
2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -188,9 +188,6 @@ function printStack(
188
188
errorProperties : Record < string , unknown > ,
189
189
onStack ?: ( ( stack : ParsedStack ) => void ) ,
190
190
) {
191
- if ( ! stack . length )
192
- return
193
-
194
191
const logger = ctx . logger
195
192
196
193
for ( const frame of stack ) {
@@ -200,7 +197,8 @@ function printStack(
200
197
logger . error ( color ( ` ${ c . dim ( F_POINTER ) } ${ [ frame . method , c . dim ( `${ path } :${ frame . line } :${ frame . column } ` ) ] . filter ( Boolean ) . join ( ' ' ) } ` ) )
201
198
onStack ?.( frame )
202
199
}
203
- logger . error ( )
200
+ if ( stack . length )
201
+ logger . error ( )
204
202
const hasProperties = Object . keys ( errorProperties ) . length > 0
205
203
if ( hasProperties ) {
206
204
logger . error ( c . red ( c . dim ( divider ( ) ) ) )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export function hasBenchmark(suite: Arrayable<Suite>): boolean {
10
10
11
11
export function hasFailedSnapshot ( suite : Arrayable < Task > ) : boolean {
12
12
return getTests ( suite ) . some ( ( s ) => {
13
- return s . result ?. errors ?. some ( e => e . message . match ( / S n a p s h o t .* m i s m a t c h e d / ) )
13
+ return s . result ?. errors ?. some ( e => e && e . message && e . message . match ( / S n a p s h o t .* m i s m a t c h e d / ) )
14
14
} )
15
15
}
16
16
You can’t perform that action at this time.
0 commit comments