Skip to content

Commit 36ce84f

Browse files
committed
some improvements
1 parent c56a768 commit 36ce84f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/workers.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,13 @@ const createWorkerObjects = (testGroups, config, testRoot, options, selectedRuns
9696
const workersToExecute = [];
9797

9898
const currentOutputFolder = config.output;
99-
const currentMochawesomeReportDir = config.mocha.reporterOptions?.mochawesome.options.reportDir;
100-
const currentMochaJunitReporterFile = config.mocha.reporterOptions['mocha-junit-reporter'].options.mochaFile;
99+
let currentMochawesomeReportDir;
100+
let currentMochaJunitReporterFile;
101+
102+
if (config.mocha.reporterOptions) {
103+
currentMochawesomeReportDir = config.mocha.reporterOptions?.mochawesome.options.reportDir;
104+
currentMochaJunitReporterFile = config.mocha.reporterOptions['mocha-junit-reporter'].options.mochaFile;
105+
}
101106

102107
collection.createRuns(selectedRuns, config).forEach((worker) => {
103108
const separator = path.sep;

0 commit comments

Comments
 (0)