File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ export default class SauceReporter implements Reporter {
182
182
try {
183
183
await this . reportTestRun ( projectSuite , report , result ?. id ) ;
184
184
} catch ( e : any ) {
185
- console . warn ( 'failed to send report to insights, ' , e . stack ( ) ) ;
185
+ console . warn ( 'failed to send report to insights: ' , e ) ;
186
186
}
187
187
}
188
188
@@ -244,6 +244,10 @@ export default class SauceReporter implements Reporter {
244
244
let duration = 0 ;
245
245
for ( const suite of projectSuite . suites ) {
246
246
suite . tests . forEach ( ( t : TestCase ) => {
247
+ if ( t . results . length < 1 ) {
248
+ return ;
249
+ }
250
+
247
251
const lastResult = t . results [ t . results . length - 1 ] ;
248
252
duration += lastResult . duration ;
249
253
} ) ;
@@ -255,6 +259,10 @@ export default class SauceReporter implements Reporter {
255
259
const errors : TestRunError [ ] = [ ] ;
256
260
for ( const suite of projectSuite . suites ) {
257
261
suite . tests . forEach ( ( t : TestCase ) => {
262
+ if ( t . results . length < 1 ) {
263
+ return ;
264
+ }
265
+
258
266
const lastResult = t . results [ t . results . length - 1 ] ;
259
267
if ( lastResult . error ) {
260
268
errors . push ( lastResult . error ) ;
You can’t perform that action at this time.
0 commit comments