@@ -20,7 +20,9 @@ export class SuiteManager {
2020 testFile : string ,
2121 suiteTitle : string ,
2222 fullPath : string | null ,
23- testNames : string [ ]
23+ testNames : string [ ] ,
24+ suiteLine ?: number | null ,
25+ testLines ?: number [ ]
2426 ) : SuiteStats {
2527 if ( ! this . currentSuiteByFile . has ( testFile ) ) {
2628 const suiteStats : SuiteStats = {
@@ -36,16 +38,19 @@ export class SuiteManager {
3638 tests : [ ] ,
3739 suites : [ ] ,
3840 hooks : [ ] ,
39- _duration : DEFAULTS . DURATION
41+ _duration : DEFAULTS . DURATION ,
42+ callSource :
43+ suiteLine && fullPath ? `${ fullPath } :${ suiteLine } ` : undefined
4044 }
4145
4246 suiteStats . uid = generateStableUid ( suiteStats . file , suiteStats . title )
4347
4448 // Create test entries with pending state
4549 if ( testNames . length > 0 ) {
46- for ( const testName of testNames ) {
50+ for ( let idx = 0 ; idx < testNames . length ; idx ++ ) {
51+ const testName = testNames [ idx ]
52+ const testLine = testLines ?. [ idx ]
4753 const fullTitle = `${ suiteTitle } ${ testName } `
48- // Generate stable UID using same method as onTestStart
4954 const testUid = generateStableUid ( fullPath || testFile , fullTitle )
5055 const testEntry : TestStats = {
5156 uid : testUid ,
@@ -60,7 +65,9 @@ export class SuiteManager {
6065 file : fullPath || testFile ,
6166 retries : DEFAULTS . RETRIES ,
6267 _duration : DEFAULTS . DURATION ,
63- hooks : [ ]
68+ hooks : [ ] ,
69+ callSource :
70+ testLine && fullPath ? `${ fullPath } :${ testLine } ` : undefined
6471 }
6572 suiteStats . tests . push ( testEntry )
6673 }
0 commit comments