jest/watch

Watch Mode

Run tests in watch mode

jest
watch
development

Command

npm test -- --watch

Explanation

Watch mode automatically re-runs tests when files change, perfect for TDD workflow.

Examples

Run tests in watch mode

npm test -- --watch

Watch all files

npm test -- --watchAll

Watch with notifications

npm test -- --watch --notify