You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diffStringsUnified, for comparing character-by-character, which is slower but also shows changed substrings within the lines with inverse foreground and background - used by standard equality matchers like toBe.
I have big snapshots with long lines and would prefer to see where exactly in line is the difference.
I suggest changing the diff call to diffStringsUnified or maybe make it configurable if performance is a concern, and set some sensible defaults.
This is for example what jest-diff recommends:
If the input strings can have arbitrary length, we recommend that the calling code set a limit, beyond which splits the strings, and then calls diffLinesUnified instead. For example, Jest falls back to line-by-line comparison if either string has length greater than 20K characters.
The text was updated successfully, but these errors were encountered:
jest-diff
has implemented two modes of comparing multiline strings:diffLinesUnified
for comparing inputs line-by-line - used bydiff
, which in turn is used by this package;diffStringsUnified
, for comparing character-by-character, which is slower but also shows changed substrings within the lines with inverse foreground and background - used by standard equality matchers liketoBe
.I have big snapshots with long lines and would prefer to see where exactly in line is the difference.
I suggest changing the
diff
call todiffStringsUnified
or maybe make it configurable if performance is a concern, and set some sensible defaults.This is for example what
jest-diff
recommends:The text was updated successfully, but these errors were encountered: