🐛 Bug Report
After committing changes without updating snapshots it is no longer possible to update those snapshots in watch mode.
It is an easy enough problem to work around by cancelling the watch and running jest -u, but I find I still bump into it every now and again.
To Reproduce
Steps to reproduce the behavior:
- Commit changes to a function that is tested via snapshot without updating the snapshots
- Run
jest --watch and input a when prompted to run the full suite
- The tests will fail (as expected) on the out of date snapshot
- Input
u to update snapshots
- Jest will log that no changes were found and not update any snapshots
No tests found related to files changed since last commit.
Press `a` to run all tests, or run Jest with `--watchAll`.
Watch Usage: Press w to show more.
Expected behavior
I expected Jest to update the failed snapshots from the previous run.
Link to repl or repo (highly encouraged)
https://github.com/r-walsh/jest-snapshot-update-bug
The above repo already has changes committed with out of date snapshots, so start at 2 in the reproduction steps.
Run npx envinfo --preset jest
System:
OS: macOS Sierra 10.12.6
CPU: x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Binaries:
Node: 8.9.4 - /usr/local/bin/node
Yarn: 1.5.1 - /usr/local/bin/yarn
npm: 6.0.0 - /usr/local/bin/npm
npmPackages:
jest: ^22.4.3 => 22.4.3
🐛 Bug Report
After committing changes without updating snapshots it is no longer possible to update those snapshots in watch mode.
It is an easy enough problem to work around by cancelling the watch and running
jest -u, but I find I still bump into it every now and again.To Reproduce
Steps to reproduce the behavior:
jest --watchand inputawhen prompted to run the full suiteuto update snapshotsExpected behavior
I expected Jest to update the failed snapshots from the previous run.
Link to repl or repo (highly encouraged)
https://github.com/r-walsh/jest-snapshot-update-bug
The above repo already has changes committed with out of date snapshots, so start at 2 in the reproduction steps.
Run
npx envinfo --preset jestSystem: OS: macOS Sierra 10.12.6 CPU: x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz Binaries: Node: 8.9.4 - /usr/local/bin/node Yarn: 1.5.1 - /usr/local/bin/yarn npm: 6.0.0 - /usr/local/bin/npm npmPackages: jest: ^22.4.3 => 22.4.3