-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using next-router-mock with class based components #19
Comments
You're correct, I have not implemented the |
@scottrippey thank you for your quick answer and to taking care of it! Meanwhile I have sort of copied the code from next/router to make it work, it looks like this now, maybe it can help you as well (probably much less code without types:) ):
|
Implemented in #20 👍 |
Fixed in |
You are the best, thank you very much!! |
Hello,
I'm trying to use next-router-mock to test class based components which are using withRouter().
My components looks like this:
And my test looks like this:
When I try to run it, it fails:
As I see there is no reference of withRouter() in the next-router-mock source, so I guess it does not support this.
Can you help me with any workaround? I guess I have to write my own mock code of withRouter() ? Or can you please implement this?
Thank you!
The text was updated successfully, but these errors were encountered: