Created
January 29, 2024 20:39
-
-
Save tjunghans/11b9ed92e5256a88d0cf99b6b583b152 to your computer and use it in GitHub Desktop.
react-query Jest Mock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place this file inside <projectRoot>/__mocks__/react-query.js | |
export const useQuery = jest | |
.fn() | |
.mockReturnValue({ data: {}, isLoading: false, error: {} }); | |
export class QueryClient {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment