Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix updateSnapshot resetting after updating snapshots in watch mode #5256

Merged
merged 1 commit into from
Jan 15, 2018

Conversation

chrisbujok
Copy link
Contributor

Fixes #4869

I'm not sure if current behavior was intended, but this fix works for me.
Also I wonder if it'd be enough to always reset to new instead of none, since it runs in the watch mode?

@chrisbujok chrisbujok force-pushed the fix-watch-update-snapshot branch from b4564d6 to ed8615f Compare January 9, 2018 00:41
@codecov-io
Copy link

Codecov Report

Merging #5256 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5256      +/-   ##
==========================================
+ Coverage   61.14%   61.14%   +<.01%     
==========================================
  Files         203      203              
  Lines        6843     6844       +1     
  Branches        3        4       +1     
==========================================
+ Hits         4184     4185       +1     
  Misses       2658     2658              
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-cli/src/watch.js 73.94% <100%> (+0.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2daf8fe...ed8615f. Read the comment docs.

@SimenB SimenB requested a review from rogeliog January 9, 2018 08:13
Copy link
Contributor

@rogeliog rogeliog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisbujok I agree it would be great to just set it to new, but I wonder if there are cases where it should have been reseted to all, so probably reseting to the previous one makes more sense... I think @aaronabramov might know better

@cpojer cpojer merged commit 634e474 into jestjs:master Jan 15, 2018
@chrisbujok chrisbujok deleted the fix-watch-update-snapshot branch January 15, 2018 11:14
@github-actions
Copy link

This pull request 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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jest doesn't write new snapshots automatically in watch mode if another snapshot has been updated
5 participants