Debug your Jest test with Jest Runner
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