You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 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 --watch
and inputa
when prompted to run the full suiteu
to 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 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
The text was updated successfully, but these errors were encountered: