When mocking a class in typescript using jest/ts-jest I am getting “TypeError: ”X“.default is not a constructor.”
问题 I am writing a unit test using jest/ts-jest in typescript and I am trying to mock a class but I am getting a TypeError. "storage_1.default is not a constructor". Here is how I am mocking the class. index.test.ts import GetAdaptiveCard from '../../GetAdaptiveCard/index' const mockGetAdaptiveCard = jest.fn(); jest.mock('../../utils/storage', () => { return jest.fn().mockImplementation(() => { return { getAdaptiveCard: mockGetAdaptiveCard } }) }) test('http trigger should return adaptive card',