The jest.fn method allows us to create a new mock function directly. If you are mocking an object method, you can use jest.spyOn .
確定! 回上一頁