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

v3.1.1 breaks use with karma-coverage #50

Closed
Lalem001 opened this issue Mar 23, 2020 · 6 comments · Fixed by #51
Closed

v3.1.1 breaks use with karma-coverage #50

Lalem001 opened this issue Mar 23, 2020 · 6 comments · Fixed by #51

Comments

@Lalem001
Copy link
Contributor

Karma's official coverage reporter was generating coverage reports just fine with v3.1.0. The subsequent release of v3.1.1 has stopped showing coverage for untested files.

Simple fix would add 'coverage' to the list of permissible reporters.

return !!reporters && (isIn(reporters, 'coverage') || isIn(reporters, 'coverage-istanbul'));
@kopach
Copy link
Owner

kopach commented Mar 24, 2020

Hi @Lalem001. Thank you for your feedback. I haven't tested karma-sabarivka-reporter with karma-coverage before. Thank you for the comment - I'll definitely do that. Would you like to create PR yourself for this change as you have it done already? I'll accept it even without tests, I can update tests myself in separate PR.

@kopach
Copy link
Owner

kopach commented Mar 24, 2020

@Lalem001, I've just encouraged strange issue while testing your feature. It looks like when karma-coverage reporter is used, order of reporters is important.
When sabarivka is registered before coverage -> karma-sabarivka-reporter doesn't work (means, doesn't have influence of final code coverage). Is that behaviour also valid for your case?

@Lalem001
Copy link
Contributor Author

My configuration has sabarivka before coverage as follows:

reporters: ['dots', 'junit', 'sabarivka', 'coverage'],

This works for me, and I get the expected output. If I reverse the order then sabarivka does not influence the output. So yes order is important.

@kopach
Copy link
Owner

kopach commented Mar 24, 2020

Could you, check, please, sabarivka after coverage? Just would like to confirm this. So, if this the only way - I'll add this to documentation (or even add some warning if used incorrectly)

kopach added a commit that referenced this issue Mar 24, 2020
@kopach
Copy link
Owner

kopach commented Mar 24, 2020

@Lalem001, new version v3.2.0 is released. Please, check it out.

@Lalem001
Copy link
Contributor Author

Yes it works, thank you!

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

Successfully merging a pull request may close this issue.

2 participants