0

Currently Jest in my VSCode uses the --watch parameter (I use the Orta.vscode-jest extension), which mean when I save a file, it will run all tests in uncommitted files.

It's a good default behavior but sometimes my upcoming commit may imply multiple files and I don't want to waste 75% of my time and resources on tests I don't to focus on.

After reading documentation, I found I can turn off the auto-run (see arrow below), so now when saving nothing happens, and I was expecting a way to trigger manually the test I want.

enter image description here

Unfortunately once done it's like if the extension was totally shut down. See below, I have no longer the ability to run tests through the extension.

enter image description here

Do you know a way to solve this? Keeping icon buttons to trigger manually specific tests?

I saw some homemade solution https://stackoverflow.com/a/55279902/3608410 (see Running a selected Jest test in Visual Studio Code) but I feel it's weird since we have a powerful extension already installed.

(maybe I missed something...)

Thank you,

Thomas Ramé
  • 438
  • 4
  • 10

1 Answers1

0

Didn't see that before but if doing a right click in the test file where needed, in the menu I'm able to run a specific test, handy!

enter image description here

Thomas Ramé
  • 438
  • 4
  • 10