[Feature]: Ability to dispatch spec files to jest non-interactively
🚀 Feature Proposal
I would like to be able to dispatch spec files non-interactively to Jest process.
Motivation
During development, I run Jest for a couple of spec files which are affected. This is how I do it
npm run test -- <list of spec file paths>
However, this causes jest to startup, execute tests and then stop after the tests complete. Since this happens many times during a day and each execution takes quite a lot of time. What's common across the test runs is the fact jest needs to start and stop, the only changing part is the spec files.
With this feature jest could run in the background, and I could run a command to inform jest about spec files to be run.
I know this sounds like watch mode, but I do not want an interactive menu on terminal; rather a non-interactive way of dispatching spec files to jest.
Example
Terminal 1: start jest
npm run test:jest-start-background // Starts jest process listening for spec files to be executed
Terminal 2: Dispatch spec files to jest
npm run test:dispatch-specs <list of spec file paths>
Pitch
By starting up jest once during development workflow, will lead to faster feedback for developer saving a lot of time.