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

Interactive snapshot update doesn't work #6611

Closed
noinkling opened this issue Jul 4, 2018 · 5 comments
Closed

Interactive snapshot update doesn't work #6611

noinkling opened this issue Jul 4, 2018 · 5 comments

Comments

@noinkling
Copy link

noinkling commented Jul 4, 2018

🐛 Bug Report

Running Jest in watch mode, I get some failing snapshot tests (the diffs are visible, etc). I press i to try and interactively update these snapshots. It shows Determining test suites to run... (plus the line showing which suite is running) for a short time. Sometimes I can notice quick flashes of something at this point, but they only appear for an instant (some of them look like failing tests, maybe the diffs as well, very difficult to make anything out at that speed). After that it just prints out:

Interactive Snapshot Result
 › 5 snapshots reviewed, 5 snapshots updated

Watch Usage
 › Press Enter to return to watch mode.

Watch Usage: Press w to show more.

I don't get presented with any other prompts during this process.

Worth noting that pressing w at this point doesn't do anything.

Looking at the snapshot files, they weren't actually updated (thankfully). If I press Enter it goes back to watch mode like expected, and the snapshot errors haven't changed.

Expected behavior

I expected to be presented with interactive prompts for updating (or not updating) failing snapshots as described here: http://jestjs.io/docs/en/snapshot-testing#interactive-snapshot-mode

Run npx envinfo --preset jest

  System:
    OS: Linux 4.4 Ubuntu 16.04.4 LTS (Xenial Xerus)
    CPU: x64 Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz
  Binaries:
    Node: 10.5.0 - /usr/bin/node
    Yarn: 1.7.0 - /usr/bin/yarn
    npm: 6.1.0 - /usr/bin/npm
  npmPackages:
    jest: ^23.2.0 => 23.2.0

It's probably important to note that I'm running in WSL. This occurs in both the WSL-provided (conhost-based) terminal, as well as in Mintty.

@wyze
Copy link
Contributor

wyze commented Jul 4, 2018

Duplicate of #6485.

@thymikee thymikee closed this as completed Jul 4, 2018
@SimenB
Copy link
Member

SimenB commented Jul 4, 2018

Fix should be out in 23.3.0

@noinkling
Copy link
Author

Duplicate of #6485.

Apologies, I did a search and somehow missed that one.

@noinkling
Copy link
Author

noinkling commented Jul 5, 2018

@wyze @SimenB 23.3.0 kinda fixes it, but there's a follow-on bug which I've made a new issue for (#6625).

@github-actions
Copy link

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.

@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants