Replies: 2 comments 2 replies
-
Hi, @CROpie! There's an official Svelte usage example we prepared for the upcoming release of MSW (see #1464 for the instructions on how to install and migrate to it). Please give it a try and let me know if it works with form actions. |
Beta Was this translation helpful? Give feedback.
2 replies
-
hey @CROpie did u find a clean way to do it? |
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
-
I was wondering whether anyone had investigated how to use msw intercept a sveltekit form action (https://kit.svelte.dev/docs/form-actions). The path should be http://localhost:5173/formaction?/test, but I am getting this error:
[MSW] Error: captured a request without a matching request handler:
• POST http://localhost:3000/undefined
Additionally, even if the request is intercepted, I'm not sure where ctx.json() in the response would end up, since the return value of the response to the fetch request seems to be handled different than in the normal method?
Any help or advice would be appreciated - especially if it's just to let me know to not spend any more time on it ;)
Beta Was this translation helpful? Give feedback.
All reactions