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

No longer getting console output after updating from v8 to v9 #4721

Closed
GeorgDangl opened this issue Aug 16, 2021 · 3 comments
Closed

No longer getting console output after updating from v8 to v9 #4721

GeorgDangl opened this issue Aug 16, 2021 · 3 comments
Labels
type: question support question

Comments

@GeorgDangl
Copy link

A few days ago, we've updated an Electron / Angular application from Mocha 8.2.1 to 9.0.3. Since then, there's no longer any console output when running tests.

That's a bit strange, since everything works, xml test results are written and even directly calling console.log() in the tests works fine. Just, nothing from Mocha...

I'm a bit at a loss here, since I didn't see anything like this in the changelog or mentioned anywhere. It's very likely just a configuration issue on my side, but there's not a lot of actual configuration happening. Supplying --dry-run to the CLI just prints out nothing.

It's almost as if there were some silent flag enabled, but I didn't find an option for that in the docs. An initial scan of the files in node_modules/mocha also didn't reveal anything...

Do you have any idea what's happening here?

@GeorgDangl GeorgDangl added the type: question support question label Aug 16, 2021
@GeorgDangl
Copy link
Author

After digging a bit deeper, I actually now found the issue. Its the mocha-junit-reporter` plugin. Disabling that produces the console output again.

However, that version hasn't changed, only the mocha package was updated. Do you know if there's any workaround for this?

@juergba
Copy link
Member

juergba commented Aug 17, 2021

@GeorgDangl There is an open issue mocha-junit-reporter/issues/135 dated Aug/2020.
So this doesn't seem to be an issue related to recent Mocha releases, but to mocha-junit-reporter itself.

@GeorgDangl
Copy link
Author

@juergba, thank you very much! I've been able to resolve it by simply using mocha-multi-reporters with both the spec and the mocha-junit-reporter reporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question support question
Projects
None yet
Development

No branches or pull requests

2 participants