This repository was archived by the owner on Jun 1, 2022. It is now read-only.
This repository was archived by the owner on Jun 1, 2022. It is now read-only.
Incorrect coverage/highlighting with karma-coverage-istanbul-reporter #803
Closed
Description
I'm submitting a bug report
- Aurelia Skeleton Version
skeleton-esnext-webpack
- Framework Version:
1.1.2
Please tell us about your environment:
-
Operating System:
Windows 10 -
Node Version:
7.3.0
- NPM Version:
4.1.1
- Webpack AND Version
webpack 2.4.1
-
Browser:
all -
Language:
ESNext
Current behavior:
When executing "npm start test.karma", the generated coverage report by Istanbul does not reflect real coverage and the highlighting of branches and functions is misplaced.
Expected/desired behavior:
Steps to reproduce:
The weird coverage report can be seen in the latest skeleton-esnext-webpack where no modifications are needed, just run "npm start test.karma" and open the generated file in ./tests/karma-coverage/index.html
- What is the expected behavior?
The generated coverage should correctly have highlighted untested branches and statements and show correct coverage on lines/statements/branches.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
[-]Incorrect coverage/highlighting with karma[/-][+]Incorrect coverage/highlighting with karma-coverage-istanbul-reporter[/+]EisenbergEffect commentedon Apr 19, 2017
@jdanyow Do we need to update something here?
JoshuaVSherman commentedon Apr 19, 2017
MarcScheib commentedon Apr 19, 2017
I was facing the same issue, but not with the webpack skeleton (and I am not really familiar with webpack).
However, I could solve it using
babel-plugin-istanbul
. I will check later whether I can apply it to the webpack repo as well to fix coverage. But perhaps this info will already help you.Edit: I had a quick look, seems like webpack is a little bit different from the JSPM setup I use 😅 Probably my hint is not useful.
JoshuaVSherman commentedon Apr 19, 2017
unfortunately, i was not successful with trying to get the babel-plugin-instanbul working
JoshuaVSherman commentedon Apr 21, 2017
If we downgrade the babel to a more stable version, does anyone know what else needs to be updated?
LinuxBozo commentedon Apr 22, 2017
@MarcScheib you were on to something with
babel-plugin-istanbul
btw.@EisenbergEffect @jdanyow Here's how we solved this: WebJamApps/combined-front#179. Will submit PR for this soon.
Fixes aurelia#803
Fixes aurelia#803
Fixes aurelia#803
LinuxBozo commentedon Apr 22, 2017
PR Submitted: #809
rezakov commentedon Apr 26, 2017
Thanks @LinuxBozo, this seems to work. I think you forgot to include the changes in package-scripts where the NODE_ENV is set to 'test' like so:
crossEnv('NODE_ENV=test karma start test/karma.conf.js')
4 remaining items