If moduleNameMapper
object has env
entry in jest config then the content of the modal is not rendered using react-testing-library
Reproduction steps:
- run
yarn
to install dependencies - run
yarn test
- confirm that the test passes - uncomment 4th line in
jest.config.js
- run
yarn test
- confirm that the test fails, no modal content is present
Related GH issue