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

[feature] make snapshot tests less noisy #17

Open
elliottneilclark opened this issue Apr 3, 2024 · 0 comments
Open

[feature] make snapshot tests less noisy #17

elliottneilclark opened this issue Apr 3, 2024 · 0 comments

Comments

@elliottneilclark
Copy link
Member

elliottneilclark commented Apr 3, 2024

When building a larger component, smaller CSS changes are less important. For example, going from mx-2 to mx-4 in the left column isn't essential. We should add a way for the deep comparison of nodes to optionally ignore some CSS.

The idea is to add an option to SnapshotCase that causes compare_attrs to dive into the class attribute, splitting the classes being added and ignoring margin, padding, class ordering, and other differences that don't matter.

Tests for small components (links or button) will want the current behavior.
Tests for aggregate components like table that are testing larger functionality can ignore more relying on tests of smaller components.

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