MSW fails to recognize a registered handler #2012
Labels
bug
Something isn't working
needs:triage
Issues that have not been investigated yet.
scope:node
Related to MSW running in Node
Prerequisites
Environment check
msw
versionNode.js version
v20.5.1
Reproduction repository
https://github.com/stevenpollack/msw-mre
Reproduction steps
Current behavior
I have 2 test files:
mswServer
, defined insrc/api/msw-server.ts
and configured viavitest.setup.ts
setupServer
The dedicated server:
request:start
event callback (which would simply log all requests).Here's the output from a vitest run:
Expected behavior
Firstly, I expect the following block
to output to std out.
Second, the statement in the same file
registers a graphQL handler that is seemingly unmatched. I would expect the server to match the graphQL request, because the other server (used in
src/views/ask-axel/hooks/use-axel-chats-shared-server.vitest.tsx
) seems to have no issues with it.The text was updated successfully, but these errors were encountered: