Jest
Execution Commands
Run Jest tests with precision — from a single test file to your entire suite. Learn to use watch mode, filter by name, run in parallel, and control test execution for fast feedback.
10 commands
Pro Tips
Use 'jest --watch' for TDD workflow — it re-runs only tests affected by changed files.
Run a single test: 'jest path/to/test.ts -t "test name pattern"' to focus on what you're debugging.
Use 'jest --bail' to stop on first failure — saves time in CI when you just need to know if something broke.
Common Mistakes
Running 'jest' without '--runInBand' runs tests in parallel by default. Tests with shared state may flake.
Jest caches transforms by default. If tests behave oddly after config changes, clear with 'jest --clearCache'.