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

Preserve function skip annotations #159

Merged
merged 3 commits into from
Feb 2, 2016

Conversation

novemberborn
Copy link
Contributor

Istanbul may mark functions as being skipped. Make sure these annotations are preserved when source maps are applied. Fixes #67.

If present, `skip` should only be `true`. Copy it to the mapped location only if
that's the case.

This avoids setting `skip` to `undefined` while mapping the report. Note that
JSON.stringify() is used when writing the report to disk, so the undefined
values wouldn't have ended up in the reports before.
Istanbul may mark functions as being skipped. Make sure these annotations are
preserved when source maps are applied.
@novemberborn novemberborn mentioned this pull request Feb 1, 2016
@kentcdodds
Copy link
Member

Works perfectly! Report screenshot in my actual project:

before:

screen shot 2016-02-01 at 10 37 12 am

after:

screen shot 2016-02-01 at 10 35 51 am

Thanks!

@novemberborn
Copy link
Contributor Author

@kentcdodds great!

@bcoe
Copy link
Member

bcoe commented Feb 2, 2016

@novemberborn wonderful work, :shipit: and I'll cut a release soon.

novemberborn added a commit that referenced this pull request Feb 2, 2016
@novemberborn novemberborn merged commit 5b72ef6 into istanbuljs:master Feb 2, 2016
@novemberborn novemberborn deleted the preserve-fn-skips branch February 2, 2016 09: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.

3 participants