Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Adding code coverage using Istanbul #1307

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sproogen
Copy link

Really useful starter kit, but I had noticed code coverage had been disabled in the latest version and I ran into a number of issues trying to get it included again.

In the end I managed to get it working with karma-coverage-istanbul-reporter and istanbul-instrumenter-loader.

I'm not sure if this is the perfect solution but thought I would pull request this solution back in.

@codecov-io
Copy link

codecov-io commented Jul 11, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@c1c4e8c). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1307   +/-   ##
=========================================
  Coverage          ?   64.13%           
=========================================
  Files             ?       13           
  Lines             ?       92           
  Branches          ?        0           
=========================================
  Hits              ?       59           
  Misses            ?       33           
  Partials          ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1c4e8c...75df3d4. Read the comment docs.

@prescottprue
Copy link

When implementing it worked great, but I got the following deprecation message:

deprecation warning from loader utils

To keep this warning from appearing I needed to update istanbul-instrumenter-loader to v3.0.0-rc.1 (can be installed using npm i --save-dev istanbul-instrumenter-loader@beta). It seems like everything beyond v3.0.0-beta.1 should work since it was fixed in issue #61 of istanbul-instrumenter-loader.

Note that this was just to fix a deprecation warning from loader-utils, so if you don't mind getting that warning, then the stable version is just fine.

@sproogen
Copy link
Author

That's good to know, I couldn't work out how to remove the deprecation messages.

Hopefully they will release v3.0.0 of the istanbul-instrumenter-loader soon then.

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants