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

Avoid mutating contexts when updating snapshots in watch mode #3353

Closed
wants to merge 1 commit into from

Conversation

thymikee
Copy link
Collaborator

@thymikee thymikee commented Apr 23, 2017

Summary

Fixes #3330 and #3316.
Mutation of contexts.config object causes some unexpected behaviors, such as retaining updateSnapshots flag. Removing mutation resolves the issue, so that overrideConfig only overrides the config for following run.

Test plan

jest

@thymikee thymikee requested a review from cpojer April 23, 2017 07:47
@thymikee thymikee changed the title Avoid mutating context config when updating snapshots in watch mode Avoid mutating contexts when updating snapshots in watch mode Apr 23, 2017
@codecov-io
Copy link

Codecov Report

Merging #3353 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3353   +/-   ##
=======================================
  Coverage   64.93%   64.93%           
=======================================
  Files         176      176           
  Lines        6514     6514           
  Branches        4        4           
=======================================
  Hits         4230     4230           
  Misses       2283     2283           
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-cli/src/watch.js 74.19% <100%> (ø) ⬆️

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 a9288e4...ae683e8. Read the comment docs.

@cpojer
Copy link
Member

cpojer commented Apr 25, 2017

I have a PR coming in which will make this obsolete. Sorry about being slow.

@cpojer cpojer closed this Apr 25, 2017
@thymikee thymikee deleted the fix-update-snapshot-watch branch August 8, 2018 20:11
@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.

Pressing u in watch mode makes it persistent across runs
5 participants