Debugging the Tests
Explore methods to debug failing tests in Jest by using the debugger statement and integrating debugging tools like Chrome DevTools and VSCode. Understand how to inspect test variables, set breakpoints, and correct code issues ensuring your tests reflect true code behavior.
We'll cover the following...
We'll cover the following...
Navigating the failing tests
What do we do when a test fails?
When a test fails, one of two things is happening:
-
Our code is not doing what we think it’s doing.
-
Our test is not testing what we think it’s testing.
As a general rule, fix the code, not the tests. Tests should not be written to pass. They should be written to test our ...