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

mapCoverage true by default #4509

Closed
eddyerburgh opened this issue Sep 19, 2017 · 7 comments
Closed

mapCoverage true by default #4509

eddyerburgh opened this issue Sep 19, 2017 · 7 comments

Comments

@eddyerburgh
Copy link
Contributor

eddyerburgh commented Sep 19, 2017

feature request - set mapCoverage to true by default

What is the current behavior?

mapCoverage is false by default

What is the expected behavior?

mapCoverage to be true by default

I maintain a jest-vue preprocessor.

A lot of users have problems with source maps. They don't realize you need to tell Jest to use source maps in the coverage reporter, so they think it's a problem with jest-vue.

Is there a reason it's false by default? I would think Jest would use source maps in coverage reporters by default

I'm happy to make a PR to change this

@eddyerburgh
Copy link
Contributor Author

Could I get some feedback on this? I'm happy to create a PR if you want to make this change 😀. @thymikee @cpojer

@thymikee
Copy link
Collaborator

I'd rather ask @aaronabramov about that. Setting this to true by default could potentially make Jest slower for regular users.

@sparecycles
Copy link

I've had issues with mapCoverage fixing code coverage for vue, but it scrambles the code coverage for js files. I've tried modifying script_transformer.js to only apply mapCoverage to .vue files, and that worked great (actually, better for vue files which were included only because of collectCoverageFrom).

I'm using jest@21.2.1

@eddyerburgh have you experienced anything similar? Currently I've worked around this by running jest twice with mapCoverage on for vue and off for js files but it would be nicer to be able to run jest once.

@eddyerburgh
Copy link
Contributor Author

@sparecycles I've encountered this issue recently. I'll look into it

@KevinStong
Copy link

Any update on this? Not trying to be pushy :) just running into this and dealing with workarounds...

thanks!

Kevin

@SimenB
Copy link
Member

SimenB commented Feb 21, 2018

See #5177, mapCoverage has been removed as of 22.4.0, its behaviour being the default

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants