0👍
There is a helper vi.mocked()
to resolve this issue with typescript.
https://vitest.dev/api/vi.html#vi-mocked
This should fix it:
vi.mocked(axios.get).mockResolvedValue()
- [Vuejs]-Unexpected keyword 'import' in WebPack Django and Vue.js project
- [Vuejs]-Assigning Axios fetched data to Vuex State from Vuex Action
-2👍
I don’t know how to solve this problem with *.test.ts
file but I solved it when using *.test.js
file.
Source:stackexchange.com