Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing on Mocha 8.x with parallel execution #140

Open
AlvinStanescu opened this issue Nov 11, 2020 · 5 comments
Open

Failing on Mocha 8.x with parallel execution #140

AlvinStanescu opened this issue Nov 11, 2020 · 5 comments

Comments

@AlvinStanescu
Copy link

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
Copy link

zxxc commented Nov 23, 2020

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)```

@unickq
Copy link

unickq commented Mar 3, 2021

same - #127

@nmazzon
Copy link

nmazzon commented Oct 23, 2023

PR are merged but I stiil have the problem.
Have you got any news for this open issue ?

@atuannguyen1101
Copy link

Also facing the same problem, currently using 2.2.1

@jeremymeng
Copy link

Any chance of this getting fixed? It was opened in 2020!

jeremymeng added a commit to jeremymeng/azure-sdk-for-js that referenced this issue Dec 5, 2023
- add an option `--no-parallel` to dev-tool to opt out parallel test execution

- currently mocha-junit-reporter isn't working with --parallel
michaelleeallen/mocha-junit-reporter#140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants