[v6] Best way to test routing components #8077
Replies: 2 comments 2 replies
-
Whether we're testing our
For many other cases, all that's needed is wrapping the component you're rendering for your test in MemoryRouter. Occasionally, you may need to do a bit more, but it'll be fairly similar to what's above. |
Beta Was this translation helpful? Give feedback.
-
Check out our |
Beta Was this translation helpful? Give feedback.
-
I thought I'd ask in hopes someone could point me in a good direction in regards to testing components within an app that is leveraging v6. In v5, it was common to create a memory history object to pass into Router, but with v6 this is no longer possible.
Is there a recommended approach for testing?
Beta Was this translation helpful? Give feedback.
All reactions