testing-react-query icon indicating copy to clipboard operation
testing-react-query copied to clipboard

testing msw V.2 update

Open 4brownie opened this issue 1 year ago • 1 comments

Working with the new version V.2 of msw, does not react the same as V.1. I have ran into issues with the HttpResponse.json() and not seeing the data returned from const {data, isLoading} = useHook(). I see data is undefined and isLoading true when call is made (expected), the isLoading goes to false after my await waitFor(()=>{}) but I do not see my object return in the data.
Not sure if you are actively using the tanstack/react-query and msw V.2 yet, but if are, would be cool to see how you made it work.

4brownie avatar Aug 09 '24 15:08 4brownie

can you try to make a PR that updates to msw v2? I can take a look at the failures then.

TkDodo avatar Aug 19 '24 09:08 TkDodo