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

Allow limiting the snapshot compare limited to certain areas #13

Open
pm-hwks opened this issue Sep 26, 2024 · 1 comment
Open

Allow limiting the snapshot compare limited to certain areas #13

pm-hwks opened this issue Sep 26, 2024 · 1 comment

Comments

@pm-hwks
Copy link

pm-hwks commented Sep 26, 2024

Appreciate all the great work and attention to detail this team has put into textual. Its simply amazing.

As part of the mock testing, there are certain areas that remains the same however there are other areas that can change (timestamps etc).

image

how can i achieve this outcome ?

@willmcgugan
Copy link
Contributor

There is no way to do that.

Snapshot tests should be used to confirm data will display as you expect. In order to do that, you need consistent data.

If your data isn't consistent, it suggests snapshots may be the wrong kind of tests. You should probably use more conventional unit tests for that.

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

2 participants