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

Fix test coverage reporting #2248

Merged
merged 2 commits into from
Jun 5, 2019
Merged

Conversation

johnBartos
Copy link
Collaborator

@johnBartos johnBartos commented May 13, 2019

This PR will...

  • Exclude the tests folder from Istanbul
  • Use the instanbul-instrument-loader
  • Bump the Karma version to the next major
    • Fixes a minor security vulnerability
    • Breaking change is dropping Node 6 support
  • Removes some extraneous deps

Why is this Pull Request needed?

So that the coverage amount is correctly reported

Are there any points in the code the reviewer needs to double check?

No

Resolves issues:

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@johnBartos johnBartos requested a review from itsjamie May 13, 2019 21:27
@johnBartos johnBartos changed the title Fix incorrect test watching and coverage reporting Fix test coverage reporting May 13, 2019
@itsjamie
Copy link
Collaborator

itsjamie commented May 13, 2019

istanbul-api a dependency of the karma-coverage-istanbul-reporter was deprecated by the Istanbul group pretty recently in favor of directly using the istanbul-*. See istanbuljs/istanbuljs#378.

I'm ok with switching back to the other dependency if the other one isn't working, however, if it just wasn't completely configured (included the tests folder in the coverage numbers) then it may save us some time from filing issues or PRs to hopefully get karma-coverage-istanbul-reporter updated to move away from istanbul-api usage in the near future if we stay with the dependency that is already targeting the v3.x dependency line.

@johnBartos
Copy link
Collaborator Author

@itsjamie We have been using the karma-coverage-istanbul-reporter - what I changed was the webpack loader (which does not use the Istanbul API afaik) from https://github.com/JS-DevTools/coverage-istanbul-loader to https://github.com/webpack-contrib/istanbul-instrumenter-loader. Not sure why we were using the former over the latter, considering one has pretty low usage and the other is maintained by people at Webpack.

I'll make the maintainer of the coverage reporter aware of the API changes to see next steps. But it seems like we can use it until we bump Istanbul to the next major.

@itsjamie
Copy link
Collaborator

Gotcha. I got lost in all the packages flying around I guess.

Yeah, if they both work sounds good to me.

@johnBartos
Copy link
Collaborator Author

Might be better to switch to a different coverage lib actually. Apparently you need to pay the maintainer of karma-coverage-istanbul-reporter for issue fixes. Going to do a bit more research.

@johnBartos johnBartos merged commit 1ea14ad into master Jun 5, 2019
@itsjamie itsjamie deleted the bugfix/fix-test-coverage-reporting branch April 12, 2020 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants