Replies: 1 comment
-
Fabulous. I just started writing tests for something like this today. Really eager to see the discussion. For context, I'm testing authentication code and I want to make sure it correctly throws or returns data and/or redirects. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I have just migrated one of my web app from Remix v2 to React Router 7 (framework). Everything seems to work as expected, but I have problems with testing loaders and actions. Basic idea how to test loaders an actions in Remix I have found on this article/tutorial from Sergio:
https://sergiodxa.com/tutorials/test-remix-loaders-and-actions
But it doesn't hold anymore because loaders and actions in React Router 7 return:
So we cannot just use res.json() or res.status() or something like: expect(res).toBeInstanceOf(Response);
How to test it in RR7?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions