Sitemap
1 min readMay 17, 2018

--

This is a very handy trick, thanks Young!

In my project, I created a jest.config.js file that contains the following:

jest.setMock(

‘@mycompany/some-package’, // initial package

require(‘@mycompany/mocks/some-package’) // mocked package

);

--

--

Adrien Joly
Adrien Joly

Written by Adrien Joly

👨‍💻 Software engineer 🥁 Drummer of “Harissa”, VR lover, music digger. https://ajo.ovh/now

No responses yet