Skip to content

Commit

Permalink
fix: revert watch mode change for onlyFailures mode (#10692)
Browse files Browse the repository at this point in the history
  • Loading branch information
victorphoenix3 committed Oct 26, 2020
1 parent 0eee946 commit 2e7ba01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions packages/jest-config/src/normalize.ts
Expand Up @@ -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) {
Expand Down

0 comments on commit 2e7ba01

Please sign in to comment.