Posts by Carlos Ricardo Ziegler • 26 points
1 post
-
0
votes1
answer67
viewsA: How do I test integration with mock from React?
Try it this way: const useContextMock = (React.useContext = jest.fn()); useContextMock.mockReturnValue({ products: mockProducts });