Replies: 2 comments 1 reply
-
For unit tests what you use as an adapter doesn't really matter. You can write React components tests or even tests loaders and actions. Example of loader/actions:
For actions is the same but you make the Request has let body = new URLSearchParams({ field: "value" })
let request = new Request("/path", { method: "POST", body }) For React components it's the same as without Remix, import component, use Testing Library React, and test it, only issue is that you can't (for now) tests components using Remix hooks or components (like Form), so you can only test components unaware of Remix. For E2E tests you can use Cypress, write your tests, run the server, run Cypress, that's it. |
Beta Was this translation helpful? Give feedback.
-
@krnbr were you able to make any progress with this? I've been trying to write some e2e tests with cypress with the hopes of using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How to unit test and e2e test remix app that has Express as adapter server.
Any initial point of how(s), where(s), what(s) and why(s)?
Was unable to see that in the docs
Beta Was this translation helpful? Give feedback.
All reactions