juhovh / mocha-jenkins-reporter

Mocha reporter for Jenkins style JUnit reports
MIT License
123 stars 69 forks source link

Not working with Mocha 8.2.1 --parallel mode #96

Open geoffcorey opened 3 years ago

geoffcorey commented 3 years ago

Versions: Node: 14.16.0 "mocha": "^8.2.1" "mocha-jenkins-reporter": "^0.4.5" "nyc": "^14.1.1"

File: mocha-config.json

{ "reporter": "mocha-jenkins-reporter", "require": ["should", "./tests/setup.js"], "exit": true }

Command:

nyc --exclude=tests/*/.js mocha --config=mocha-config.json --parallel --timeout 480000 tests/*/.js

Results:

Every test suite fails with individual test error of

  21) Uncaught error outside test suite:
     Uncaught TypeError: Cannot read property 'length' of undefined
      at startSuite (node_modules/mocha-jenkins-reporter/lib/jenkins.js:171:21)
      at ParallelBufferedRunner.<anonymous> (node_modules/mocha-jenkins-reporter/lib/jenkins.js:331:5)
      at ParallelBufferedRunner.EventEmitter.emit (domain.js:467:12)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)