You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am using mocha-multi-reporters in my mocha tests and generating mochawesome and mocha-junit-reports. When using --parallel flag, mocha-junit-reporter throws error:
Uncaught error outside test suite:
Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at isInvalidSuite (node_modules/mocha-junit-reporter/index.js:155:62)
at MochaJUnitReporter._onSuiteBegin (node_modules/mocha-junit-reporter/index.js:232:10)
at MochaJUnitReporter. (node_modules/mocha-junit-reporter/index.js:239:17)
at ParallelBufferedRunner.emit (node:events:530:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.allSettled (index 0)
i am using mocha-multi-reporters in my mocha tests and generating mochawesome and mocha-junit-reports. When using --parallel flag, mocha-junit-reporter throws error:
Uncaught error outside test suite:
Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at isInvalidSuite (node_modules/mocha-junit-reporter/index.js:155:62)
at MochaJUnitReporter._onSuiteBegin (node_modules/mocha-junit-reporter/index.js:232:10)
at MochaJUnitReporter. (node_modules/mocha-junit-reporter/index.js:239:17)
at ParallelBufferedRunner.emit (node:events:530:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.allSettled (index 0)
command used to run the tests is:
./node_modules/mocha/bin/mocha.js --config .mocharc.cjs --parallel --reporter mocha-multi-reporters --reporter-options configFile=reporter-config.json --require mochawesome/register --exit test/**/*.spec.js
below is the reporter config file:
{
"reporterEnabled": "mochawesome, mocha-junit-reporter",
"mochawesomeReporterOptions": {
"reportDir": "results/mochawesome",
"overwrite": false,
"html": true,
"json": true,
"toConsole": true,
"consoleReporter": "spec"
},
"mochaJunitReporterReporterOptions": {
"mochaFile": "results/junit/test-results.xml"
}
noticed that if i remove "--require mochawesome/register" flag, i get same error as defined in #178
Version:
"mochawesome": "^7.1.3",
"mocha-junit-reporter": "2.2.0",
"mocha-multi-reporters": "^1.5.1"
"mocha": "^10.4.0",
The text was updated successfully, but these errors were encountered: