-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Add invisible characters highlighting in diffs #2673
Comments
Since Jest 18.1.0 we're highlighting trailing whitespace: #2347 |
I've opened a PR with a fix for that |
thank you @thymikee for fixing it! |
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. |
feature request
What is the current behavior?
Currently the diffs don't check for invisible characters like spaces. I spent a bit of time debugging an invariant error check. And my tests weren't passing because I was leaving a space before the new line character. In the end I used
.toThrowErrorMatchingSnapshot()
and copy pasting that to my test case made the test pass and made me realise that I was adding that extra space before\n
.and passes fine when:
At the moment it's hard to guess, what it is, at first I thought that there was something wrong with how the quotes are being escaped, as that's what is shown in the diff.
What is the expected behavior?
It would be great if we could highlight these invisible characters in the diff.
The text was updated successfully, but these errors were encountered: