Open a Terminal in your project's folder and run:
This library has a peer dependency for react-test-renderer
package. Make sure that your react-test-renderer
version matches exactly your react
version.
To set up React Native-specific Jest matchers, add the following line to your jest-setup.ts
file (configured using setupFilesAfterEnv
):
We recommend setting up eslint-plugin-testing-library
package to help you avoid common Testing Library mistakes and bad practices.
Install the plugin (assuming you already have eslint
installed & configured):
Then, add relevant entry to your ESLint config (e.g., .eslintrc.js
). We recommend extending the react
plugin: