You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm having a hard time understanding and finding information on how to mock useFetch/useAsyncData returned data.
I've tried using the following as well as an MSW server included in vitest.setup.ts but with no success:
In the snapshot I can see that no data was fetched and nothing changes no matter which above mentioned method I try to mock the data with. pages/__tests__/__snapshots__/Test.spec.ts.snap
Hello, I'm having a hard time understanding and finding information on how to mock useFetch/useAsyncData returned data.
I've tried using the following as well as an MSW server included in
vitest.setup.ts
but with no success:Here's an example component
pages/test.vue
:pages/__tests__/Test.spec.ts
:In the snapshot I can see that no data was fetched and nothing changes no matter which above mentioned method I try to mock the data with.
pages/__tests__/__snapshots__/Test.spec.ts.snap
vitest.config.ts
vitest.setup.ts
The text was updated successfully, but these errors were encountered: