Apr 17, 2021 ยท To mock a TypeScript interface in jest, you only need an object that has the same functions as the interface. In our case, we need to mock a function that returns a promise. We can do that with jest.fn(): const replyRepositoryMock = { findOneByIntent: jest.fn().mockReturnValue(Promise.resolve({text: replyText})) };. "/>Typescript jest mock promise