In this article, I show you how to set up Visual Studio Code to get an overview of your tests and debug individual tests.

In this article we use the example project from the  previous article which was about how to set up a new project with jest in Typescript.

As your project continues to grow and increase in complexity, so do the tests grow in number. Let’s just imagine we have a big project with about 100 tests and now one test is failing. You have to know which test it failing, why it’s failing and where in the source code the error occurs.

Getting started

As we did in the previous article, we change the add() function again, causing an error.

Image for post

If we run all tests from the console, we will see something similar to the image below, but it would be very helpful if the IDE could help us to work more efficient.

Image for post

#typescript #javascript #nodejs #debugging

Debug Your Tests in TypeScript with Visual Studio Code
1.50 GEEK