File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { writeFile } from "fs/promises" ;
2
2
import { globSync } from "glob" ;
3
3
import Mocha from "mocha" ;
4
- import { resolve } from "path" ;
4
+ import { join , resolve } from "path" ;
5
5
6
6
export async function run ( ) {
7
- console . log ( `process.cwd=${ process . cwd ( ) } __dirname=${ __dirname } ` ) ;
7
+ // Unix cwd is ___/vscode, but on Windows it's ___/vscode/.vscode-test/<archive>/
8
+ // so we're going off of __dirname which is ___/vscode/out/src for both
9
+ const projectRoot = resolve ( __dirname , "../.." ) ;
10
+ const resultFilePath = join ( projectRoot , "TEST-result.xml" ) ;
11
+ console . log ( `Writing test results to "${ resultFilePath } "` ) ;
8
12
9
13
const version = process . env . VSCODE_VERSION ?? "stable" ;
10
14
const mocha = new Mocha ( {
@@ -16,7 +20,7 @@ export async function run() {
16
20
reporterEnabled : "spec, mocha-junit-reporter" ,
17
21
mochaJunitReporterReporterOptions : {
18
22
testsuitesTitle : `VS Code (${ version } ) Extension Tests: Mocha (${ process . platform } ${ process . arch } )` ,
19
- mochaFile : resolve ( process . cwd ( ) , "TEST-result.xml" ) ,
23
+ mochaFile : resultFilePath ,
20
24
} ,
21
25
} ,
22
26
} ) ;
You can’t perform that action at this time.
0 commit comments