DEV Community

Nithin Peter
Nithin Peter

Posted on

Jest Run It - Run and debug individual Jest tests from VS Code

While writing tests in Jest have you ever wanted to run a single test that you changed, but have to fiddle with Jest CLI arguments so that Jest can run only that test. I know, I have been there and it is painful.

Wouldn't it be nice if you could choose what test(s) to run right from your editor/IDE. And apparently IntelliJ family of IDEs had this feature for ages. I get so jealous when I pair with my co-worker who uses IntelliJ and they run/debug a test with the click of a button. My favorite IDE of the world, VS Code, couldn't do it. So I decided to find a solution and it resulted in me writing this VS Code plugin.

Introducing: Jest Run It ๐Ÿƒโ€โ™€๏ธ๐Ÿƒโ€โ™‚๏ธ

Jest Run It

How to get it?

Search for "Jest run it" in your VS Code extensions panel (Learn how?). You should be able to find it and click on install.

You can find more details about the configuration options details here: https://marketplace.visualstudio.com/items?itemName=vespa-dev-works.jestRunIt

Github link: https://github.com/nithinpeter/jest-run-it

Other notable features

Apart from able to run/debug individual tests it has few other tricks under the sleeve as well:

  1. Test explorer view Alt Text
  2. Editor title actions to run/debug tests Alt Text

Top comments (0)