File tree 3 files changed +5
-1
lines changed
3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -336,6 +336,7 @@ export class IstanbulCoverageProvider
336
336
this . checkThresholds ( {
337
337
thresholds : resolvedThresholds ,
338
338
perFile : this . options . thresholds . perFile ,
339
+ onError : error => this . ctx . logger . error ( error ) ,
339
340
} )
340
341
341
342
if ( this . options . thresholds . autoUpdate && allTestsRun ) {
Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ export class V8CoverageProvider
324
324
this . checkThresholds ( {
325
325
thresholds : resolvedThresholds ,
326
326
perFile : this . options . thresholds . perFile ,
327
+ onError : error => this . ctx . logger . error ( error ) ,
327
328
} )
328
329
329
330
if ( this . options . thresholds . autoUpdate && allTestsRun ) {
Original file line number Diff line number Diff line change @@ -95,9 +95,11 @@ export class BaseCoverageProvider {
95
95
checkThresholds ( {
96
96
thresholds : allThresholds ,
97
97
perFile,
98
+ onError,
98
99
} : {
99
100
thresholds : ResolvedThreshold [ ]
100
101
perFile ?: boolean
102
+ onError : ( error : string ) => void
101
103
} ) {
102
104
for ( const { coverageMap, thresholds, name } of allThresholds ) {
103
105
if (
@@ -154,7 +156,7 @@ export class BaseCoverageProvider {
154
156
) } `
155
157
}
156
158
157
- console . error ( errorMessage )
159
+ onError ( errorMessage )
158
160
}
159
161
}
160
162
}
You can’t perform that action at this time.
0 commit comments