Replies: 1 comment 1 reply
-
Hi, @bzitzow. Let's clarify that I do believe this comes down to how your testing framework evaluates the There has been a very similar question in #1283, where I go into detail about why nesting |
Beta Was this translation helpful? Give feedback.
-
Hello,
We recently observed this behavior. The questions are:
a) How come the server needs to be in the global scope?
b) How come it does not intercept requests if the server is instantiated per test (in the beforeEach())?
Environment:
🛑 Test Setup 1)
Given Test Setup 1), the MSW server was not intercepting the requests as expected.
✅ Test Setup 2)
Given Test Setup 2), it does intercept the requests as expected.
Beta Was this translation helpful? Give feedback.
All reactions