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

fix: handle attempts to merge function into block coverage #3

Merged
merged 1 commit into from
May 5, 2019

Conversation

bcoe
Copy link
Collaborator

@bcoe bcoe commented Jan 20, 2019

The Node.js test suite runs into situations where attempts are made to merge function granularity coverage into block level granularity, leading to incorrect coverage reports:

screen shot 2019-01-19 at 9 51 22 pm

this issue can be addressed by always preferring block level coverage.

fixes: #2

@bcoe bcoe requested a review from demurgos January 20, 2019 06:18
@demurgos
Copy link
Owner

demurgos commented May 2, 2019

Sorry for the long delay: I missed the notification. I'll take a look at the PR and merge it.

@bcoe
Copy link
Collaborator Author

bcoe commented May 3, 2019

@demurgos the other issue I bumped into yesterday trying to use this at work was that /gs on regexes was having trouble on Windows, because you're splitting lines on \n, I think we can just drop the s and make the regexes in ascii.js, /g.

Copy link
Owner

@demurgos demurgos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR: I looked into the issue and your solution. I agree that the current implementation is clearly wrong in its handling of mixed block and non-block function coverages.

There's a bit of information lost here (block level coverage overrides non-block level) but this PR is simple and improves the current situation so I'll merge it and publish it to npm. I'll keep the issue open for the the moment though: I'd like to see if there's a way to keep both block coverage and non-block coverage information that is suitable for consumers.

@demurgos
Copy link
Owner

demurgos commented May 5, 2019

Regarding ascii.js, I expected this file to be system-agnostic and help generate fixtures from ascii diagrams. I'll send a follow-up PR to fix it.

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.

block and function level coverage are incompatible and should not be merged
2 participants