Twitter | Search | |
Dan Abramov
Often see people writing super complicated tests because they don’t know they can mock out any components with Jest. Now you know!
Reply Retweet Like More
Dan Abramov 22 Jun 18
Replying to @giuseppegurgone
Yeah
Reply Retweet Like
Dan Abramov 22 Jun 18
Replying to @Blackstock1110
Send PRs?
Reply Retweet Like
Sophie Alpert 22 Jun 18
Replying to @dan_abramov
Why not Route: 'Route'?
Reply Retweet Like
Dan Abramov 22 Jun 18
Replying to @sophiebits
I think ReactDOM will warn about unknown tag in this case, not sure.
Reply Retweet Like
Christoph Nakazawa 22 Jun 18
react-test-renderer shouldn't warn.
Reply Retweet Like
Dan Abramov 22 Jun 18
Replying to @cpojer @sophiebits
Yep. Most people seem to use ReactDOM though (through Enzyme).
Reply Retweet Like
Liz 22 Jun 18
Is it incorrect to do so?
Reply Retweet Like
Dan Abramov 22 Jun 18
I think there are good arguments for either, depends on what behaviors you're testing I think
Reply Retweet Like
Meligy, GuruStop, ng-sydney 27 Jun 18
How about something like this?
Reply Retweet Like
Dan Abramov 27 Jun 18
We do something like this in a few places
Reply Retweet Like