jest-community / vscode-jest

The optimal flow for Jest based testing in VS Code
MIT License
2.82k stars 290 forks source link

Jest snapshot updating not working: "Replace them" button doing nothing #647

Open danawoodman opened 3 years ago

danawoodman commented 3 years ago

Environment

  1. node -v: v14.1.0

  2. npm -v: 6.14.4 (we use yarn: 1.22.4)

  3. npm ls jest or npm ls react-scripts (if you haven’t ejected): jest@26.6.3

  4. your vscode-jest settings if customized:

    • jest.pathToJest? empty/default
    • jest.pathToConfig? empty/default
    • anything else that you think might be relevant? not really; running jest on the command line works as does hitting u to update. Only other thing I can think is I'm using multiple projects in my Jest config.
  5. Operating system: macOs Catalina 10.15.7 (19H15)

Prerequisite

Steps to Reproduce

I'm not sure how to repro. I installed extension, added the config (below) as recommended and ran my tests. The snapshots are out of date and I see a message to update them but clicking does not update them.

screenshot -2021-01-13 at 10 31 32

    {
      "type": "node",
      "name": "vscode-jest-tests",
      "request": "launch",
      "program": "${workspaceFolder}/node_modules/jest/bin/jest",
      "args": ["--runInBand"],
      "cwd": "${workspaceFolder}",
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen",
      "disableOptimisticBPs": true
    },

Relevant Debug Info

Not sure what else I can provide to be helpful.

Expected Behavior

Should update snapshots

Actual Behavior

Not updating snapshots

connectdotz commented 3 years ago

hmmm... a few things to check...