Jest: Mock modules using jest.mock method

jest.mock('lodash/memoize', () => a => a)The original lodash/memoize should exist
jest.mock('lodash/memoize', () => a => a, { virtual: true })The original lodash/memoize isn’t required

Leave a Reply

Your email address will not be published. Required fields are marked *