@@ -42,25 +42,27 @@ function getSpecResults(specResults: SpecResult, attempts?: any[]) {
42
42
return specResults ;
43
43
}
44
44
45
- const enhancedTestList = ( specResults . tests ?? [ ] ) . map ( ( test : any ) => {
46
- const testFullTitle = test . title . join ( " " ) ;
47
- const standaloneAttempts = attempts . filter (
48
- ( attempt ) => attempt . fullTitle === testFullTitle
49
- ) ;
50
- test . attempts = standaloneAttempts . map ( ( attempt ) => ( {
51
- state : attempt . state ,
52
- error : getAttemptError ( attempt . err ) ,
53
- timings : attempt . timings ,
54
- wallClockStartedAt : attempt . wallClockStartedAt ,
55
- wallClockDuration : attempt . duration ,
56
- videoTimestamp : getAttemptVideoTimestamp (
57
- parseISO ( attempt . wallClockStartedAt ) . getTime ( ) ,
58
- parseISO ( specResults . stats . startedAt ) . getTime ( )
59
- ) ,
60
- } ) ) ;
61
- test . testId = standaloneAttempts [ 0 ] . id ;
62
- return test ;
63
- } ) ;
45
+ const enhancedTestList = ( specResults . tests ?? [ ] ) . map (
46
+ ( test : any , i : number ) => {
47
+ const testFullTitle = test . title . join ( " " ) ;
48
+ const standaloneAttempts = attempts . filter (
49
+ ( attempt ) => attempt . fullTitle === testFullTitle
50
+ ) ;
51
+ test . attempts = standaloneAttempts . map ( ( attempt ) => ( {
52
+ state : attempt . state ,
53
+ error : getAttemptError ( attempt . err ) ,
54
+ timings : attempt . timings ,
55
+ wallClockStartedAt : attempt . wallClockStartedAt ,
56
+ wallClockDuration : attempt . duration ,
57
+ videoTimestamp : getAttemptVideoTimestamp (
58
+ parseISO ( attempt . wallClockStartedAt ) . getTime ( ) ,
59
+ parseISO ( specResults . stats . startedAt ) . getTime ( )
60
+ ) ,
61
+ } ) ) ;
62
+ test . testId = standaloneAttempts [ 0 ] ?. id ?? `r${ i } }` ;
63
+ return test ;
64
+ }
65
+ ) ;
64
66
65
67
return {
66
68
..._ . cloneDeep ( specResults ) ,
0 commit comments