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 Jun 22
Replying to @giuseppegurgone
Yeah
Reply Retweet Like
Dan Abramov Jun 22
Replying to @Blackstock1110
Send PRs?
Reply Retweet Like
Sophie Alpert Jun 22
Replying to @dan_abramov
Why not Route: 'Route'?
Reply Retweet Like
Dan Abramov Jun 22
Replying to @sophiebits
I think ReactDOM will warn about unknown tag in this case, not sure.
Reply Retweet Like
Christoph Nakazawa Jun 22
react-test-renderer shouldn't warn.
Reply Retweet Like
Dan Abramov Jun 22
Replying to @cpojer @sophiebits
Yep. Most people seem to use ReactDOM though (through Enzyme).
Reply Retweet Like
Liz Jun 22
Is it incorrect to do so?
Reply Retweet Like
Dan Abramov Jun 22
I think there are good arguments for either, depends on what behaviors you're testing I think
Reply Retweet Like
Meligy, GuruStop, ng-sydney Jun 27
How about something like this?
Reply Retweet Like
Dan Abramov Jun 27
We do something like this in a few places
Reply Retweet Like