Closed antoniogiroz closed 5 years ago
I mock a module like so:
const { aMethodInTheModule } = require('./myModule'); jest.mock('./myModule', () => ({ aMethodInTheModule: jest.fn(), }));
Then, the below code doesn't works:
when(aMethodInTheModule) .calledWith('a') .mockReturnValue(() => Promise.resolve('b'));
I guess you figured it out :)
I mock a module like so:
Then, the below code doesn't works: