File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed 
packages/vitest/src/node/reporters Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,16 @@ This is usually an absolute unix file path (even on Windows). It can be a virtua
2424' C:\\ Users\\ Documents\\ project\\ example.test.ts'   //  ❌
2525``` 
2626
27+ ## relativeModuleId  
28+ 
29+ Module id relative to the project. This is the same as ` task.name `  in the deprecated API.
30+ 
31+ ``` ts 
32+ ' project/example.test.ts'   //  ✅
33+ ' example.test.ts'   //  ✅
34+ ' project\\ example.test.ts'   //  ❌
35+ ``` 
36+ 
2737## state  
2838
2939``` ts 
Original file line number Diff line number Diff line change @@ -437,10 +437,16 @@ export class TestModule extends SuiteImplementation {
437437   */ 
438438  public  readonly  moduleId : string 
439439
440+   /** 
441+    * Module id relative to the project. This is the same as `task.name`. 
442+    */ 
443+   public  readonly  relativeModuleId : string 
444+ 
440445  /** @internal  */ 
441446  protected  constructor ( task : RunnerTestFile ,  project : TestProject )  { 
442447    super ( task ,  project ) 
443448    this . moduleId  =  task . filepath 
449+     this . relativeModuleId  =  task . name 
444450  } 
445451
446452  /** 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments