@@ -9,9 +9,9 @@ if (parseInt(nodeVersion[0].replace()) < 20 || (parseInt(nodeVersion[0]) === 20
99
1010import { fork } from 'child_process' ;
1111import { existsSync , readFileSync , writeFileSync , unlinkSync } from 'fs' ;
12- import { join , dirname , isAbsolute } from 'path' ;
12+ import { join , dirname , isAbsolute , win32 } from 'path' ;
1313import { pathToFileURL } from 'url' ;
14- import { tmpdir } from 'os' ;
14+ import { tmpdir , platform } from 'os' ;
1515import ts from 'typescript' ;
1616import yargs from 'yargs/yargs' ;
1717import { hideBin } from 'yargs/helpers' ;
@@ -138,10 +138,14 @@ if ((!reportDirectory || !reportName) && reporter !== 'console-only') {
138138 throw new Error ( `Properties testReportDirectory and testReportName should be specified unless testReporter is 'console-only'.` ) ;
139139}
140140
141- const reportPath = reporter !== 'console-only'
141+ let reportPath = reporter !== 'console-only'
142142 ? isAbsolute ( reportDirectory ) ? reportDirectory : join ( dirname ( configFileURI . pathname ) , reportDirectory )
143143 : null ;
144144
145+ if ( platform ( ) === 'win32' ) {
146+ reportPath = win32 . normalize ( reportPath ) ;
147+ }
148+
145149switch ( config . frameworkSettings . testSettings . testFramework ) {
146150 case 'vitest' : {
147151 const { createVitest } = await import ( 'vitest/node' ) ;
0 commit comments