Jest error "Cannot find module 'next-auth/react'" #9880
Replies: 5 comments 1 reply
-
Did you find the solution? |
Beta Was this translation helpful? Give feedback.
-
I also have this issue, does anyone have any ideas? |
Beta Was this translation helpful? Give feedback.
-
managed to create a mock that works fine for my use case, published it on this repository |
Beta Was this translation helpful? Give feedback.
-
Came across this issue just now, @renanleonel your mocks worked for my case (albeit very similar) as well. Does anyone know if mocks for next-auth been required in previous versions? This is my first time using it. |
Beta Was this translation helpful? Give feedback.
-
Hello |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
hi, i'm trying to do a basic test of my sidebar using my component that performs the signOut action from next auth. this is a next.js 14 project using jest/testing-library.
i'm using "next-auth": "5.0.0-beta.4", with the middleware.ts authentication
this is my component:
and this is my sidebar.test.tsx
currently i'm facing this error while trying to render the component:
this is my jest.config.js file
how can i solve this?
Beta Was this translation helpful? Give feedback.
All reactions