Debug Your Tests in TypeScript with Visual Studio Code

Debug Your Tests in TypeScript with Visual Studio Code

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, 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

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Build and Debug NodeJS Typescript with ONLY VSCODE

Having all your workflow driven by your IDE can be a massive time saver. In this lesson we look at how you can build and debug a NodeJS application written in TypeScript using only VSCode 🌹

JavaScript Vs TypeScript 2021 | Difference Between JavaScript and TypeScript | Simple Explanation

JavaScript Vs TypeScript 2021 | Difference Between JavaScript and TypeScript | Simple Explanation. Let's check out the differences between JavaScript and TypeScript in the simplest of ways.

JavaScript vs TypeScript | JavaScript And TypeScript Difference | Full Stack Course

"This video on JavaScript vs TypeScript helps you understand the two languages and draw a comparison between them. JavaScript is a client-side scripting language while TypeScript is an OOP language developed to address the shortcomings of JavaScript. Although TypeScript supports all the features of JavaScript, they have significant differences.

The What, Why, and How of TypeScript for JavaScript Developers

A typed introduction to JavaScript .The What, Why, and How of TypeScript for JavaScript Developers

NodeJS + TypeScript, How to Set Up

NodeJS + TypeScript, How to Set Up