-
Notifications
You must be signed in to change notification settings - Fork 231
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
What is your question:
I want to use useHistory hook in my test.
const {result} = renderHook(() => useHistory(), {
wrapper: BrowserRouter,
})
The problem is the result is got giving me the correct route. It seems like the mounted App and the useHistory hook in the test are using two different instances of BrowserRouter
I want to reference useHistory hook inside the test. So I can know the current path and change routes.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested