Debugging the Tests
Learn how to debug tests and code when our Jest tests start to fail.
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 assumptions of how our code works and should pass because our ...