Debug your Jest test with Jest Runner

Yeu Lind Yeo
Mar 17, 2022

Jest Runner is an extension that helps you to run and debug your test

After you installed and enable it in your vs code, you’ll see run and debug in your test file.

Instead of using command like this: jest calculator.test -t ‘Adding two numbers’. You could click on run to run a specific test with just a click

You could also add a breakpoint on the function and run a specific test to debug why your test case failed.

This really helps to shorten the time to find out why your test failed

Use Jest Runner to be more efficient

You can find the extension here

If you want to test it out, you can clone the project here

It’s written by Bhargav Bachina

If you want to know more about unit test, visit his article here

It’s a great example

--

--

Yeu Lind Yeo
Yeu Lind Yeo

Written by Yeu Lind Yeo

Coding is an art and I’m an artist 😎. Web developer at day, dreamer at night. Curiosity kills a cat and luckily I’m not a cat. 🐶

No responses yet