It seems that it isn't possible to get the component tree to update with the route when simulating clicking <Link> in tests. I suspect this is due to missing context. I saw that there used to be a <RouterProvider> context component and then there was a provideRouter function. Is there a way to provide the appropriate context to the component tree in tests, akin to wrapping the component to be tested in a <Provider> component of some kind so that the component tree updates when the route changes?
It seems that it isn't possible to get the component tree to update with the route when simulating clicking
<Link>
in tests. I suspect this is due to missing context. I saw that there used to be a<RouterProvider>
context component and then there was aprovideRouter
function. Is there a way to provide the appropriate context to the component tree in tests, akin to wrapping the component to be tested in a<Provider>
component of some kind so that the component tree updates when the route changes?