TypeError: Invalid state: ReadableStream is locked
at handleRequest (/node_modules/msw/src/core/utils/handleRequest.ts:125:25)
an error is happening when same API endpoint is triggered multiple times during test execution. Seems like error comes from onMockedResponse method, comparing it with same method from msw we can see that response is cloned before usage. When I've added response.clone() problem is gone
Hey, 👋 running my tests I've faced such issue
an error is happening when same API endpoint is triggered multiple times during test execution. Seems like error comes from onMockedResponse method, comparing it with same method from msw we can see that response is cloned before usage. When I've added
response.clone()
problem is goneDoes it make sense from your point of view? Thx.