#3710·Jest

feature request: automatically raise coverage?

Author: ljharbCreated Jun 1, 2017Updated Sep 22, 2026
Labels:rocket: Feature Request

Currently, if I have coverageThresholds defined, jest will (correctly) error out if any of the 4 metrics is below their threshold.

However, when coverage goes up, i'd like a way to automatically bump the thresholds to match the new, higher, coverage values.

One or both of the following would be helpful:

  1. a command that exited nonzero when coverage did not exactly meet the (whole-number-rounded) thresholds
  2. a command that updated my jest config inline (whether in package.json or a separate file) to make thresholds match current values, only if they are not lower than the current ones.