Do you want to request a _feature_ or report a _bug_?
Bug
What is the current behavior?
If Jest with --findRelatedTests flag does not detect any related tests it exits with exit code 1.
What is the expected behavior?
In this case, it'd be good to exit with exit code 0. So it won't fail pre-commit hook with lint-staged for example.
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Jest 22, node 7.7.6, npm 4.1.2, win10
Add the --passWithNoTests as well, and it exits with 0 on no tests
FWIW, as of #5127 findRelatedTests by default exits with 0 even without the flag.
Most helpful comment
Add the
--passWithNoTestsas well, and it exits with0on no tests