Failing on Mocha 8.x with parallel execution
AlvinStanescu opened this issue · 7 comments
AlvinStanescu commented
mocha-junit-reporter
seems to be failing when executed on Mocha 8.x with parallel execution enabled.
The below error is thrown for every suite
event:
mocha:parallel:parallel-buffered-runner run(): encountered uncaught exception: TypeError: Cannot read property 'length' of undefined
mocha:parallel:parallel-buffered-runner at isInvalidSuite (node_modules/mocha-junit-reporter/index.js:151:62)
mocha:parallel:parallel-buffered-runner at MochaJUnitReporter.<anonymous> (node_modules/mocha-junit-reporter/index.js:224:10)
mocha:parallel:parallel-buffered-runner at ParallelBufferedRunner.emit (events.js:327:22)
mocha:parallel:parallel-buffered-runner at emitEvent (node_modules/mocha/lib/nodejs/parallel-buffered-runner.js:120:12)
mocha:parallel:parallel-buffered-runner at node_modules/mocha/lib/nodejs/parallel-buffered-runner.js:197:13
mocha:parallel:parallel-buffered-runner at processTicksAndRejections (internal/process/task_queues.js:97:5) +1ms
mocha:parallel:parallel-buffered-runner run(): done running file Tests\_suite.ts +10ms
Disabling test parallelization fixes the issue, but it would be great to have it working together with parallel execution.
zxxc commented
mocha-junit-reportes is failing for me in parallel mode too, but with slightly different error:
^
TypeError: Cannot read property 'testsuite' of undefined
at lastSuite (/Users/aklamer/Documents/GitHub/i2g-underwood/node_modules/mocha-junit-reporter/index.js:209:46)```
nmazzon commented
PR are merged but I stiil have the problem.
Have you got any news for this open issue ?
atuannguyen1101 commented
Also facing the same problem, currently using 2.2.1
jeremymeng commented
Any chance of this getting fixed? It was opened in 2020!