Support for server-only
testing NextJS App Router Server Actions
#66675
aniketbiprojit
started this conversation in
Ideas
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.
-
Goals
Non-Goals
No response
Background
Not able to run e2e test on server actions due to these limitations.
If I import a server action without running next this is the current error:
Current alternative for mocking cookies:
Proposal
Automatic mocking of these requests would be pretty good for a flag like
MOCK_NEXT_FUNCTIONS="true"
.Or allow import of
next/headers
to be allowed so we can directly use jest.mock and not updatecookies()
->await getCookies()
everywhere.Beta Was this translation helpful? Give feedback.
All reactions