Open albertofcasuso opened 1 year ago
@albertofcasuso Some have suggested I clear the cache of all the rtk query after each test. Not sure if this will resolve it, and i have not tried yet. If it works for you, can you let me know? :D
I've tried that following this guide.
Where it uses this piece of code
afterEach(()=> {store.dispatch(apiSlice.util.resetApiState()})
And did not do the trick for me. Still looking for something
UPDATE: I've opened this issue in rtk-query repo in case you'd like to take a look. It includes a public repo https://github.com/reduxjs/redux-toolkit/issues/3069
@albertofcasuso Seems like thats the work around. did that solution workout for you?
Hi, just run into this exact same issue with RTK Query, MSW and Vitest. Have you found any solution?