importActual not working in browserMode #6217
Unanswered
kenelliott
asked this question in
Q&A
Replies: 1 comment 4 replies
-
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
First I'd like to say thank you for the hard work on browserMode. I know it is in its early stages so I assumed I'd run into some hurdles. My team has been wanting this ability for some time. I wanted to create a stackblitz of the problem, but it is blocked by my corporate proxy.
My issue is specifically with mocking react-router-dom. It works in non-browser mode but not in browser mode.
First my test looks like this
The component looks like this
renderWithMemoryRouter implementation
Pass
vitest
Fail
vitest --browser.enabled=true --browser.name=chromium --browser.provider=playwright
SyntaxError: The requested module '/node_modules/.vite/deps/react-router-dom.js?v=76d0ae7e' does not provide an export named 'useNavigate'
Thanks for looking at this, I'm interested if it is my fault or not.
Edit added package versions
Beta Was this translation helpful? Give feedback.
All reactions