-
-
Notifications
You must be signed in to change notification settings - Fork 536
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test overriding isolation #407
Comments
Hi @yekver thanks for reaching us. It could happen. As we suggest the server instance should be one. If you add handlers in some tests they will be added to the same shared server instance. This will cause this kind of issues |
Are there anything we can do to deal with this concurrency and make per-test overriding isolated? Or this is by design and won't be fixed? |
Call of |
As @marcosvega91 has mentioned, request interception in NodeJS is achieved by patching request issuing modules. That patching is done for the entire process. In that way MSW works almost identical to Nock. Would anybody be interested in looking how Nock handles this scenario? We can learn a thing of two from them. |
I think that only |
Let's discuss this issue in #474. Thanks. |
I use jest with puppeteer to run my e2e tests. If I run
jest --maxWorkers=5
instead forjest --runInBand
then I will probably face with a race condition problem when some test use request overriding and will affect all other tests, because it's not scoped only to this test.Am I right?
The text was updated successfully, but these errors were encountered: