@@ -16,23 +16,23 @@ export function run(): Promise<void> {
16
16
reporter : "mocha-multi-reporters" ,
17
17
timeout : 5000 ,
18
18
reporterOptions : {
19
- reporterEnabled : "spec, mocha-junit-reporter" ,
20
- mochaJunitReporterReporterOptions : {
21
- mochaFile : path . join ( __dirname , ".." , ".." , "test-results.xml" ) ,
22
- } ,
19
+ // NOTE: The XML output by Mocha's xUnit reporter is actually in the
20
+ // JUnit style. I'm unsure how no one else has noticed this.
21
+ reporterEnabled : "spec, xunit" ,
22
+ xunitReporterOptions : {
23
+ output : path . join ( __dirname , ".." , ".." , "test-results.xml" ) ,
24
+ }
23
25
} ,
24
26
} ) ;
25
27
26
- const testsRoot = path . resolve ( __dirname , ".." ) ;
27
-
28
28
return new Promise ( ( c , e ) => {
29
- glob ( "**/**.test.js" , { cwd : testsRoot } , ( err , files ) => {
29
+ glob ( "**/**.test.js" , { cwd : __dirname } , ( err , files ) => {
30
30
if ( err ) {
31
31
return e ( err ) ;
32
32
}
33
33
34
34
// Add files to the test suite
35
- files . forEach ( f => mocha . addFile ( path . resolve ( testsRoot , f ) ) ) ;
35
+ files . forEach ( f => mocha . addFile ( path . resolve ( __dirname , f ) ) ) ;
36
36
37
37
try {
38
38
// Run the mocha test
0 commit comments