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(snapshot): correct snapshot comparison with carriage returns #37

Merged
merged 1 commit into from
Nov 27, 2019

Conversation

leguellec
Copy link
Contributor

@leguellec leguellec commented Nov 29, 2018

Summary

Veggies use a method named normalizeNewlines on the content before writing the snapshot (and it replace carriage return and line feed (\r\n) with line feed (\n)), . Unfortunately this method is not used on the content when we try to compare it to the previously generated snapshot, and the comparison fail. The change is to apply
normalizeNewlines on the content in the expectToMatchmethod from the snapshot extension

Test plan

Not sure if i put test in the right place ... maybe have to change it :) . Add one functional test in the example sections, but there is also functional test in tests folder but only for snapshot extension ( and don't look very relevant). By the way test a content with CR LF and expect the comparison with the snapshot to match

@leguellec leguellec force-pushed the fix-snapshot-and-carriage-returns branch 2 times, most recently from 8d5c877 to 336277c Compare January 8, 2019 14:50
@leguellec leguellec force-pushed the fix-snapshot-and-carriage-returns branch 3 times, most recently from 6f96f1c to a84c33e Compare May 7, 2019 16:37
@leguellec leguellec force-pushed the fix-snapshot-and-carriage-returns branch 2 times, most recently from 431dfea to d707c42 Compare November 27, 2019 09:41
@leguellec leguellec force-pushed the fix-snapshot-and-carriage-returns branch from d707c42 to 74f92fb Compare November 27, 2019 09:42
@leguellec leguellec merged commit f1e60e5 into ekino:master Nov 27, 2019
@leguellec leguellec deleted the fix-snapshot-and-carriage-returns branch November 27, 2019 10:38
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.

1 participant