0

I am using Jest in my CRA + Typescript application (ejected). Recently I have installed the vscode-jest extension. When I first open vscode and go to a test file, I can see there are codelens "Debug" next to each of my test (next to the "it" keep word).

enter image description here

Clicking on "Debug" get the specific test running (which is really cool and handy). But then if I close this file and reopen it, codelens disappear after the first run and I cannot seem to get them reappear for subsequent run.

The only way is to close and reopen Vscode.

Is this a known bug? or am I forgetting something? Any suggestion would be greatly appreciated. Thanks!

skyboyer
  • 22,209
  • 7
  • 57
  • 64
TheSoul
  • 4,906
  • 13
  • 44
  • 74
  • This looks like a bug. You should file an issue against whatever extension is providing those code lenses – Matt Bierner Jun 13 '18 at 18:47
  • I noticed it doesn't show if the test passes or when jest stopped because it failed to many times. I had to reload window to get it to work as described here: this:https://github.com/jest-community/vscode-jest/blob/master/README.md#troubleshooting – Radu Cojocari Oct 05 '18 at 10:03

1 Answers1

0

Try adding the following to VS Code settings.json:

"jest.debugCodeLens.showWhenTestStateIn": [
  "fail",
  "unknown",
  "pass"
],
Toivo Säwén
  • 1,905
  • 2
  • 17
  • 33