Can't match the handler in tests in nuxt 3 app using useFetch composable #2215
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.11.1
Reproduction repository
https://github.com/andreimakushkin/nuxt3-msw
Reproduction steps
I've created an Example vue component with test for it, the component use useFetch composable to call an API, but it doesn't work in test. The test just fails without any errors. MSW server doesn't intercept the call.
In order to run test, use command
npm run test
Current behavior
await useFetch('/api/example'); // Doesn't match the msw handler
Expected behavior
await useFetch('/api/example'); // Should match the msw handler
The text was updated successfully, but these errors were encountered: