File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151
5252* ` [jest-config] ` Add ` forceCoverageMatch ` to allow collecting coverage from
5353 ignored files. ([ #5081 ] ( https://github.com/facebook/jest/pull/5081 ) )
54+ * ` [jest-cli] ` Make Jest exit without an error when no tests are found in
55+ the case of ` --lastCommit ` , ` --findRelatedTests ` , or ` --onlyChanged ` options
56+ having been passed to the CLI
5457
5558## jest 22.0.0
5659
Original file line number Diff line number Diff line change @@ -153,7 +153,12 @@ export default (async function runJest({
153153 globalConfig ,
154154 ) ;
155155
156- if ( globalConfig . passWithNoTests ) {
156+ if (
157+ globalConfig . passWithNoTests ||
158+ globalConfig . findRelatedTests ||
159+ globalConfig . lastCommit ||
160+ globalConfig . onlyChanged
161+ ) {
157162 new Console ( outputStream , outputStream ) . log ( noTestsFoundMessage ) ;
158163 } else {
159164 new Console ( outputStream , outputStream ) . error ( noTestsFoundMessage ) ;
You can’t perform that action at this time.
0 commit comments