New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
msw doesn't seem to actually work with this setup #25
Comments
Ah, that's a bummer. I tested it in the other stacks but not this one. We may need to be a bit more invasive by requiring the mocks in app code 馃槵 @tbeseda can you confirm that this will run in a different node process from the app? If so, we may need to move that require into Would be better if there were a way to do a |
Yeah, I'm playing around with running msw in server.ts and it seems to work okay. |
Can confirm it does work if you start the server in |
Correct, Architect will run each function execution in a new process. It does use the same environment from the root project/package.json, but doesn't inherit from the parent process. This behavior is important to emulating how Lambda will run the function in isolation on AWS. |
Is the issue with Architect running functions in a new process also the reason why I can't seem to get VS Code debugging working with the routes in the Grunge Stack? Used a |
any luck trying to make debugger work in grunge stack @eXigentCoder? |
I am also facing challenges to debug in grunge stack. Anyonbe knows of some advices to make it work? |
Not sure if I'm doing something wrong but when I run
npm run dev
I see that the mocks are being started and loaded with this logconsole.info("馃敹 Mock server running");
However, if I change onUnhandledRequest to "error" like this
server.listen({ onUnhandledRequest: "error" });
I never see any errors or logs about unhandled requests even though I'm definitely making requests to Stripe.I've tried all sorts of things to debug but can't make progress.
Any ideas?
edit: seems like the sanbox is likely starting separate node processes to run the lambdas which MSW won't see.
The text was updated successfully, but these errors were encountered: