@@ -97,21 +97,19 @@ const createWorkerObjects = (testGroups, config, testRoot, options, selectedRuns
97
97
98
98
const currentOutputFolder = config . output ;
99
99
const currentMochawesomeReportDir = config . mocha . reporterOptions ?. mochawesome . options . reportDir ;
100
- const currentMochaJunitReporterFile = config . mocha . reporterOptions [ " mocha-junit-reporter" ] . options . mochaFile ;
100
+ const currentMochaJunitReporterFile = config . mocha . reporterOptions [ ' mocha-junit-reporter' ] . options . mochaFile ;
101
101
102
102
collection . createRuns ( selectedRuns , config ) . forEach ( ( worker ) => {
103
+ const separator = path . sep ;
103
104
const _config = { ...config } ;
104
- const workerName = worker . name . replace ( ":" , "_" ) ;
105
- _config . output = `${ currentOutputFolder } / ${ workerName } ` ;
105
+ let workerName = worker . name . replace ( ':' , '_' ) ;
106
+ _config . output = `${ currentOutputFolder } ${ separator } ${ workerName } ` ;
106
107
if ( config . mocha && config . mocha . reporterOptions ) {
107
- _config . mocha . reporterOptions . mochawesome . options . reportDir = `${ currentMochawesomeReportDir } /${ workerName } ` ;
108
-
109
- let _tempArray = currentMochaJunitReporterFile . split ( "/" ) ;
110
-
111
- _tempArray = _tempArray . splice ( _tempArray . length - 2 , 0 , workerName ) ;
112
-
113
- _config . mocha . reporterOptions ?[ "mocha-junit-reporter" ] . options . mochaFile = _tempArray . join ( "/" ) ;
108
+ _config . mocha . reporterOptions . mochawesome . options . reportDir = `${ currentMochawesomeReportDir } ${ separator } ${ workerName } ` ;
114
109
110
+ let _tempArray = currentMochaJunitReporterFile . split ( separator ) ;
111
+ _tempArray = _tempArray . splice ( _tempArray . length - 2 , 0 , workerName ) ;
112
+ _config . mocha . reporterOptions [ 'mocha-junit-reporter' ] . options . mochaFile = _tempArray . join ( separator ) ;
115
113
}
116
114
workerName = worker . getOriginalName ( ) || worker . getName ( ) ;
117
115
const workerConfig = worker . getConfig ( ) ;
0 commit comments