Jest: Watch a test file
11 April 2023 (Updated 8 April 2024)
On this page
Using jest
Syntax
Example
This will watch userService.spec.ts
for changes and re-run the tests related to that file.
Using NPM script
Assuming you have a test:watch
NPM script that looks like this:
You can run
Sources
Tagged:
Jest
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment