Skip to content

avisek123/RNUnitTesting

Repository files navigation

Unit testing

Unit Testing in Jest & React Native Testing Library.

When working on a project with a tight deadlines, it's easy to skip writing tests. But once you learn how to write them, you'll find it's not that hard and the benefits are huge. Writing tests helps you catch problems early and makes your job easier in the long run.

About

This project was created for the tutorial [Learn how to perform unit testing in React Native with Jest & React Native Tetsing Library] This is a new React Native project, bootstrapped using @react-native-community/cli.

Written test case with Jest.

Written test case for UI elements.

Common Issues and Troubleshooting

Error: Module not found

Ensure all required modules are installed and correctly referenced in your configuration files. Run npm install or yarn to install dependencies.

Error: Cannot find module '@testing-library/react-native'

Verify that @testing-library/react-native is installed and included in your devDependencies. If needed, run npm install --save-dev @testing-library/react-native.

🤔 How to contribute

Have an idea? Found a bug? Please raise to ISSUES. Contributions are welcome and are greatly appreciated! Every little bit helps.

Thanks! ❤️
avisek123.github.io
Avisek

WhatsApp Image 2024-09-19 at 7 49 24 PM