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

);

--

--

--

Web software development × personal development. https://adrienjoly.com/now 🚀

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adrien Joly

Adrien Joly

Web software development × personal development. https://adrienjoly.com/now 🚀

More from Medium

My Experience of cloning Banggood.com

Gameplay Journal Entry #7

5 Tips to Set Accurate Deadlines

Why I love Zion