I\'m trying to mock an async function that is exported as a default export but all I get is TypeError: Cannot read property \'then\' of undefined
Wh
You can mock anything with jest, like this jest.mock('@material-ui/core/withWidth', () => ({ __esModule: true, isWidthUp: jest.fn((a, b) => true), default: jest.fn(fn => fn => fn) }))
jest.mock('@material-ui/core/withWidth', () => ({ __esModule: true, isWidthUp: jest.fn((a, b) => true), default: jest.fn(fn => fn => fn) }))