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

Coverage appears to differ by if you destructure a nullable React prop or not. #2513

Closed
tobysmith568 opened this issue Sep 11, 2020 · 1 comment
Assignees

Comments

@tobysmith568
Copy link

tobysmith568 commented Sep 11, 2020

Coverage appears to differ by if you destructure a nullable React prop or not.

Lines 15 and 16 show different coverage indicators even though they're using the same data in the same way. The only difference is that one of them is using a destructured prop and one is not.

I believe the coverage should be yellow/orange for both because there is only one test and it does not pass in a falsy value.

Repro repo: /~https://github.com/tobysmith568/Wallaby.JS-Repro

Diagnostics Report: /~https://github.com/tobysmith568/Wallaby.JS-Repro/blob/main/diagnostics-report.txt

@ArtemGovorov
Copy link
Member

Thanks for reporting the issue and sharing the sample repo. The issue is fixed and the fix is published in the latest core version 1.0.956.

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

No branches or pull requests

2 participants