Skip to content

Incorrect line numbers highlighted in coverage report #11727

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

Closed
brian428 opened this issue Jul 31, 2018 · 3 comments
Closed

Incorrect line numbers highlighted in coverage report #11727

brian428 opened this issue Jul 31, 2018 · 3 comments

Comments

@brian428
Copy link

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [X] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Windows 10, Node 8.11.3, NPM 5.6.0, CLI 6.1.1

Repro steps

Run Jasmine tests with coverage report enabled. The report it creates has coverage warnings highlighted, but they are all in the wrong (seemingly random) places:

bad_coverage

I'm not sure if this is actually a CLI problem, or an Istanbul problem, or a source map problem, or some combination. I've tried turning on and off sourceMap and evalSourceMap, but it doesn't seem to affect the results.

Desired functionality

Correct coverage report output.

@brian428
Copy link
Author

I should also add that you can see this if you generate a fresh project with 6.1.1, add something simple like a method with an if block in the AppComponent, and run a test with coverage:

bad_coverage2

@brian428
Copy link
Author

Ah, never mind, I see there's already an issue for this at #11672.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant