You can mock with a spy and import the mocked module. In your test you set how the mock should behave using mockImplementation: jest.mock('the-package-to-mock',
確定! 回上一頁