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

Get code coverage working. #1

Merged
merged 2 commits into from
Nov 10, 2017

Conversation

jacksonrayhamilton
Copy link
Contributor

@jacksonrayhamilton jacksonrayhamilton commented Nov 10, 2017

karma-coverage seems to fail at resolving source files, see: karma-runner/karma-coverage#202

I adapted the instructions from this package: https://github.com/jas-chen/karma-sourcemap-writer (the package itself did not seem to actually be necessary)

We are using remap-istanbul to resolve the source files like suggested here: https://github.com/SitePen/remap-istanbul/wiki/Karma-How-To

And finally we generate the HTML report ourself, filtering only the source files in this application.

The CLI "reporters" option was overriding the config file's config.  Source maps
aren't working yet, but at least SOMETHING works now.
@@ -31,6 +34,7 @@
"brunch": "^2.10.9",
"chai": "^3.5.0",
"eslint": "^3.15.0",
"istanbul": "jacksonrayhamilton/istanbul#09f9660",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My fork of istanbul is off the last released version (0.4.5) and fixes this bug which would otherwise occur when generating the HTML report.

@caleb531 caleb531 merged commit 1d45df7 into caleb531:coverage Nov 10, 2017
@jacksonrayhamilton jacksonrayhamilton deleted the coverage branch November 12, 2017 22:44
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 this pull request may close these issues.

2 participants