Rerun all tests when package.json changes
See original GitHub issueClear and concise description of the problem
Currently if package.json
changes and you’re running tests with the --changed
flag you will get no tests running.

Suggested solution
Run all tests when package.json
has changed
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that request the same feature to avoid creating a duplicate.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Watch and rerun Jest JS tests - npm
Is there a way of watching your source and tests to rerun Jest tests automatically when relevant files have been changed? npm ·...
Read more >Run jest for unit tests of modified files only | by SunCommander
In this article, you will learn how to run Jest for modified files only in a Pull Request. This can be done using...
Read more >npm-test
Test a package. ... Description. This runs a predefined command specified in the "test" property of a package's "scripts" object.
Read more >ng test
Option Description Value Type Defau...
‑‑browsers Override which browsers tests are run against. string
‑‑code‑coverage Output a code coverage report. boolean false
‑‑code‑coverage‑exclude Globs to exclude...
Read more >How To Test a React App with Jest and React Testing Library
The npm install command will install all the project dependencies defined in the ... the tests automatically re-run after a file is changed....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s possible a dependency update could break the tests.
This sounds like a great idea
Sure. Just a heads up, we are filtering files here:
https://github.com/vitest-dev/vitest/blob/3e4f3bef5c8a961ffc6ea0df638dcaf629e1be75/packages/vitest/src/node/core.ts#L175
I think we should first check if any related files are in
forceRerunTrigger
, then if yes, just return full list of files without filtering.