Testing with app router features for real world nextjs14 application #29915
Unanswered
sajjad-khedmati
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Regarding the general topic I have in mind:
Firstly, about mocking Next.js version 13 (App Router) and its actions, as well as other related matters:
In general, they all converge on one common point: the server-side execution for the App Router and the client-side nature of Cypress. Specifically, the features of Server Components (SC) and Actions.
In component testing, if we have used actions (importing code that runs server-side), we encounter the "react-server-dom/client" error.
Moreover, for end-to-end (E2E) tests, there is no access to data fetching and mocking for a page that uses the async/await format. Initially, the main server-side component code runs, so Cypress cannot mock them.
Beta Was this translation helpful? Give feedback.
All reactions