You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project is using next 13.5.2, which is different from next-view-transition next 14. However, is a basic feature and should not be an issue.
When I run pnpm dev, or build then start, the application still works perfectly fine. Just the tests are failing. I'm using @testing-library/react
The text was updated successfully, but these errors were encountered:
@oliviadang2024 Did you manage to find a solution to this? 🙂
I had similar problems using Jest (along with additional errors regarding Jest encountering an unexpected token etc). 🤔
I assume this is happening because Jest can't see any links inside our components/pages (because they're now being handled by next-view-transitions rather than next/link) therefore, I was able to fix this by mocking the rendering of those links instead....
This allows the link to be rendered (in the eyes of Jest) with both ...rest and children ensuring anything else associated with your links is not lost in the process.
Happy to hear alternative methods if someone suggests something more elegant, thanks! 🙂
When I test the component using (imported from
next-view-transition
), it shows this error:My project is using next 13.5.2, which is different from next-view-transition next 14. However, is a basic feature and should not be an issue.
When I run
pnpm dev
, orbuild
thenstart
, the application still works perfectly fine. Just the tests are failing. I'm using@testing-library/react
The text was updated successfully, but these errors were encountered: