diff --git a/CHANGELOG.md b/CHANGELOG.md index bc4c3c1f8bde..7cce32ece1bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Fixes +- `[jest-config]` Fix bug introduced in watch mode by PR[#10678](https://github.com/facebook/jest/pull/10678/files#r511037803) ([#10692](https://github.com/facebook/jest/pull/10692)) - `[expect]` Stop modifying the sample in `expect.objectContaining()` ([#10711](https://github.com/facebook/jest/pull/10711)) ### Chore & Maintenance diff --git a/packages/jest-config/src/normalize.ts b/packages/jest-config/src/normalize.ts index 5d60d45c2053..e5598f5a29ff 100644 --- a/packages/jest-config/src/normalize.ts +++ b/packages/jest-config/src/normalize.ts @@ -989,9 +989,8 @@ export default function normalize( newOptions.onlyFailures = false; } else if (newOptions.testPathPattern) { // When passing a test path pattern we don't want to only monitor changed - // or failed files unless `--watch` is also passed. + // files unless `--watch` is also passed. newOptions.onlyChanged = newOptions.watch; - newOptions.onlyFailures = newOptions.watch; } if (!newOptions.onlyChanged) {