File tree 1 file changed +9
-3
lines changed 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,15 @@ export const IS_VSTS = process.env.TF_BUILD !== undefined;
10
10
export const IS_CI_SERVER = IS_TRAVIS || IS_APPVEYOR || IS_VSTS ;
11
11
12
12
// allow the CI server to specify JUnit output...
13
- export const MOCHA_REPORTER_JUNIT : boolean = IS_CI_SERVER && process . env . MOCHA_REPORTER_JUNIT !== undefined ;
14
- export const MOCHA_CI_REPORTFILE : string = MOCHA_REPORTER_JUNIT && process . env . MOCHA_CI_REPORTFILE !== undefined ? process . env . MOCHA_CI_REPORTFILE . toString ( ) : './junit-out.xml' ;
15
- export const MOCHA_CI_PROPERTIES : string = MOCHA_REPORTER_JUNIT && process . env . MOCHA_CI_PROPERTIES !== undefined ? process . env . MOCHA_CI_PROPERTIES . toString ( ) : '' ;
13
+ let reportJunit : boolean = false ;
14
+ if ( IS_CI_SERVER && process . env . MOCHA_REPORTER_JUNIT !== undefined ) {
15
+ reportJunit = process . env . MOCHA_REPORTER_JUNIT . toLowerCase ( ) === 'true' ;
16
+ }
17
+ export const MOCHA_REPORTER_JUNIT : boolean = reportJunit ;
18
+ export const MOCHA_CI_REPORTFILE : string = MOCHA_REPORTER_JUNIT && process . env . MOCHA_CI_REPORTFILE !== undefined ?
19
+ process . env . MOCHA_CI_REPORTFILE : './junit-out.xml' ;
20
+ export const MOCHA_CI_PROPERTIES : string = MOCHA_REPORTER_JUNIT && process . env . MOCHA_CI_PROPERTIES !== undefined ?
21
+ process . env . MOCHA_CI_PROPERTIES : '' ;
16
22
17
23
export const TEST_TIMEOUT = 25000 ;
18
24
export const IS_MULTI_ROOT_TEST = isMultitrootTest ( ) ;
You can’t perform that action at this time.
0 commit comments