New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
8 recipes Β· 49 steps Β· about 44 minutes of reading
I installed Vitest, wrote one test, and it fails before it even reaches my code, with jsdom missing entirely.
Half my tests grab a button with a test id, so I have no idea what a screen reader actually announces for it.
fireEvent.change fires one bare event. My form's validation listens for the events a real keystroke actually sends.
One test in the suite is slower than the rest, and it fails whenever the network hiccups, because it's calling the real API.
A component that checks window.matchMedia crashes the moment its test runs, because jsdom never built that API.
My debounced search box waits 400ms before it fires. Testing it for real means every run of the suite sits there waiting.
The same test passes on my machine every time and fails in CI a few times a week, for no reason I can find.
The coverage number in my terminal says 40%. My CI job still turns green.
Cookbook badge
Finish all 8 recipes to earn this.