const returnValue = () => 'hello'; const mock1 = jest.fn(); mock1.mockReturnValue(returnValue); expect(mock1('hi')).toBe(returnValue); const mock2 = jest.fn(); ...
確定! 回上一頁