In the chapter mocking-global-objects.md, it's suggested to add the mock for the i18n library to the jest.init.js file, since this file "is loaded before the tests are run automatically." But this needs to be expressly configured by adding the following to the jest.config.js file:
In the chapter
mocking-global-objects.md
, it's suggested to add the mock for the i18n library to thejest.init.js
file, since this file "is loaded before the tests are run automatically." But this needs to be expressly configured by adding the following to thejest.config.js
file:I'd suggest you add this to the documentation or suggest that users of the testing guide copy the
jest.config.js
file from the repo.Thanks for putting this guide together!