Command
npm test -- --watchExplanation
Watch mode automatically re-runs tests when files change, perfect for TDD workflow.
Examples
Run tests in watch mode
npm test -- --watchWatch all files
npm test -- --watchAllWatch with notifications
npm test -- --watch --notify