This repository was archived by the owner on Mar 12, 2020. It is now read-only.
Conversation
a6d91a2 to
549a4bc
Compare
Generated by 🚫 danger |
Contributor
Author
|
I'm gonna wait on adding junit testing, looks like it's on Jest's TODO: jestjs/jest#104 (comment) |
Contributor
Author
|
I had a thought that it might be nice to be able to run those snapshots as storybooks, might ask about it |
45f83db to
0f2eeb4
Compare
Contributor
Author
|
Awesome, merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OK, so, while this is still early days - we can start using Jest's Snapshot Testing. It looks a lot like what you were trying to do with mocha/shallow react-native.
IMO this solves a lot of the conceptual problems I was having around figuring out the testing structure. I'll miss real snapshots, but I'd trade the visual fidelity for cross-platform and extremely fast, readable JSON.
As a part of this, I studied how typings works. I now understand that it's a per-project thing, and you typically do
typings installin a project to get all the auto-completion working. I have a bunch of staged typing file deletions which will be another second PR. Too much noise.I've also got my JS Dangerfiles fork in, in theory we should get a hello world message from @ArtsyMobile.
Here's an example of what a completed test suite looks like: bartonhammond/snowflake#110