首先,我嘗試用jest 來模擬API 調用,然后我用nock 進行了嘗試,正如react-query 文檔( https://react-query.tanstack.com/guides/testing )中所說的那樣。
確定! 回上一頁