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

Improve formatting of big diffs #37

Closed
skuzzle opened this issue Nov 4, 2022 · 1 comment
Closed

Improve formatting of big diffs #37

skuzzle opened this issue Nov 4, 2022 · 1 comment

Comments

@skuzzle
Copy link
Owner

skuzzle commented Nov 4, 2022

When snapshots get big, its hard to spot the differences in the unified diff that we print. We should maybe reduce the diff to only print the lines in which something changed.
TextSnapshot class should get an option to configure the number of context lines that are to be printed around a certain change

skuzzle added a commit that referenced this issue Nov 14, 2022
Improve rendering of big unified diffs by leaving out unchanged parts. For text-only comparison this must be explicitly configured using `TextSnapshot.text().withContextLines(10)`. Unified diffs that are automatically generated by the framework during structure comparison will use a default value of `5` context lines. For now this value is not configurable.

Closes #37
@skuzzle
Copy link
Owner Author

skuzzle commented Nov 16, 2022

Will be released with 1.5.0

@skuzzle skuzzle closed this as completed Nov 16, 2022
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

1 participant