Skip to content
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
@rezakov

Description

@rezakov

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.

image

Activity

changed the title [-]Incorrect coverage/highlighting with karma[/-] [+]Incorrect coverage/highlighting with karma-coverage-istanbul-reporter[/+] on Apr 18, 2017
EisenbergEffect

EisenbergEffect commented on Apr 19, 2017

@EisenbergEffect
Contributor

@jdanyow Do we need to update something here?

JoshuaVSherman

JoshuaVSherman commented on Apr 19, 2017

@JoshuaVSherman
MarcScheib

MarcScheib commented on Apr 19, 2017

@MarcScheib

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

JoshuaVSherman commented on Apr 19, 2017

@JoshuaVSherman

unfortunately, i was not successful with trying to get the babel-plugin-instanbul working

JoshuaVSherman

JoshuaVSherman commented on Apr 21, 2017

@JoshuaVSherman

If we downgrade the babel to a more stable version, does anyone know what else needs to be updated?

LinuxBozo

LinuxBozo commented on Apr 22, 2017

@LinuxBozo
Contributor

@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.

added 3 commits that reference this issue on Apr 22, 2017
43b1350
bac0351
29a47df
LinuxBozo

LinuxBozo commented on Apr 22, 2017

@LinuxBozo
Contributor

PR Submitted: #809

rezakov

rezakov commented on Apr 26, 2017

@rezakov
Author

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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @EisenbergEffect@LinuxBozo@jdanyow@MarcScheib@rezakov

      Issue actions

        Incorrect coverage/highlighting with karma-coverage-istanbul-reporter · Issue #803 · aurelia/skeleton-navigation