Skip to content

Commit 0234b54

Browse files
committed
04: write readme
1 parent 14cf89f commit 0234b54

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

exercises/04.debugging/README.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
# Debugging tests
22

3-
Learn how to debug your browser tests in Vitest. Your runbook to follow when a test fails.
3+
It's natural that you want the tests you write to pass. But in reality, the value of tests comes from [📜 when they fail](https://www.epicweb.dev/writing-tests-that-fail). That means the safeguard of automation you put there is catching bugs or regressions. That means one less broken user experience shipped to production. It's working.
4+
5+
But nobody likes a failing test, and twice so if you are tasked with fixing one.
6+
7+
In this exercise block, you will discover the debugging techniques that turn failed tests from a task you put off until it's too late to a pleasant and even fun experience. The next time you've got a tricky test on your hands, you will have the right tools to employ.
8+
9+
## Debugging techniques
10+
11+
There's plenty of ways to debug JavaScript code, and most of them still apply when debugging tests as well. You have likely tried isolating the behaviors, experimenting with the input, following stack traces, desperately spamming `console.log()` everywhere—the good stuff. Today is not about that.
12+
13+
Today, I would love to talk about specific techniques for debugging your in-browser tests. The things you will use _on top_ of the general arsenal of tools you already know and love. Techniques specific to Vitest Browser Mode or those that require extra steps to be used in the browser.
14+
15+
Sounds exciting? Let's go.

0 commit comments

Comments
 (0)