Today I Learned: Mocking multiple named exports in Jest

I know only one way. Mock it: jest.mock('path/to/some/module', () => ({ someNamedExportFromModule: jest.fn() })); Then import it: import {someNamedExportFromModule} from 'path/to/some/module'; Setup value to return: someNamedExportFromModule.mockReturnValue('someValue'); ??? You are the best. gl hf

December 7, 2018