Testing · Middle · Question 29 of 75

How do you test a component that depends on the current route (React Router)?

Explanation

A memory router gives a real navigation context without a browser URL.

Further reading

Problem with a question

Testing · Middle · question 29

Test yourself

Take the Testing · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz