@@ -9,9 +9,9 @@ if (parseInt(nodeVersion[0].replace()) < 20 || (parseInt(nodeVersion[0]) === 20
9
9
10
10
import { fork } from 'child_process' ;
11
11
import { existsSync , readFileSync , writeFileSync , unlinkSync } from 'fs' ;
12
- import { join , dirname , isAbsolute } from 'path' ;
12
+ import { join , dirname , isAbsolute , win32 } from 'path' ;
13
13
import { pathToFileURL } from 'url' ;
14
- import { tmpdir } from 'os' ;
14
+ import { tmpdir , platform } from 'os' ;
15
15
import ts from 'typescript' ;
16
16
import yargs from 'yargs/yargs' ;
17
17
import { hideBin } from 'yargs/helpers' ;
@@ -138,10 +138,14 @@ if ((!reportDirectory || !reportName) && reporter !== 'console-only') {
138
138
throw new Error ( `Properties testReportDirectory and testReportName should be specified unless testReporter is 'console-only'.` ) ;
139
139
}
140
140
141
- const reportPath = reporter !== 'console-only'
141
+ let reportPath = reporter !== 'console-only'
142
142
? isAbsolute ( reportDirectory ) ? reportDirectory : join ( dirname ( configFileURI . pathname ) , reportDirectory )
143
143
: null ;
144
144
145
+ if ( platform ( ) === 'win32' ) {
146
+ reportPath = win32 . normalize ( reportPath ) ;
147
+ }
148
+
145
149
switch ( config . frameworkSettings . testSettings . testFramework ) {
146
150
case 'vitest' : {
147
151
const { createVitest } = await import ( 'vitest/node' ) ;
0 commit comments