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

[dev] Fix Jest snapshot tests on RN 0.61 #4193

Open
southerneer opened this issue Sep 26, 2019 · 4 comments
Open

[dev] Fix Jest snapshot tests on RN 0.61 #4193

southerneer opened this issue Sep 26, 2019 · 4 comments
Assignees

Comments

@southerneer
Copy link
Contributor

No description provided.

@aksonov
Copy link
Contributor

aksonov commented Sep 27, 2019

Maybe we should not spend too much time on it? What if 0.62 changes it again? We need to find out some stable solution that will not be changed frequently..

@southerneer
Copy link
Contributor Author

What if 0.62 changes it again

Seems unlikely. This is the first time that react-native has explicitly changed the test-renderer relationship since I first wrote the snapshot tests.

If these changes reflect changes to the internals of react-native then they are a good thing. We're not trying to make tests that never fail, we're trying to make tests that reveal changes that we wouldn't have noticed otherwise. As changes come along we can just mock the parts we aren't concerned with.

@southerneer
Copy link
Contributor Author

Well, I spent the 2nd half of Friday and almost all of today researching this and trying various hacks to no avail. I'm gonna table it for now and just stay tuned to the RN issue (which they reopened 3 days ago).

Snapshot tests are nice when they're easy to maintain, but proper typing on components eliminates a lot of the error surface area that snapshots help with so I feel like we can comfortably do without them until there's an easier way to manage them.

@bengtan
Copy link
Contributor

bengtan commented Oct 2, 2019

Ack. Let's wait and monitor the upstream discussion.

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

3 participants