A bunch of exemples using Jest and Testing Library
-
Basic Test
-
Advanced Test
-
Regular Functions
yarn jest --watch
- Run and watch all tests related to the changed file
yarn jest --watchAll
- Run and watch all tests
yarn jest -t <ComponentName />
- Run a specific test suit (describe(string))
yarn jest --collectCoverage
- Run all tests and creates a coverage file