Problems in unit tests: "useLocation" in UMI #6467
Unanswered
aspirantzhang
asked this question in
Q&A
Replies: 1 comment
-
React 17 + React Testing Library + Umi After a period of trying, I found two ways to solve.
I think it may be a problem with react-router, but due to my limited understanding, I don't have a better solution yet. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A very simple component
and the test. Ref: React Router - Testing libaray
But it says "Invalid hook call".
What's the right way. Can you give me some advice or example? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions