How does Jest determine what tests to run in watch mode?

Viewed 90

In my project we are using Jest as our test runner in an Angular project, using jest-preset-angular. Lately I have noticed that even a single file change while running Jest in watch mode causes a minimum of 300 tests to run, ones that are definitely, 100%, completely unrelated to the file that changed.

How does Jest determine what tests it needs to run in watch mode? I need to figure out why Jest thinks it needs to run these tests, it's causing developer friction and slowing down our CI pipelines.

0 Answers
Related