Skip to content
How to Read Coverage — and the Metrics Beyond It thumbnail

How to Read Coverage — and the Metrics Beyond It

This is Part 18 of the “Frontend Testing, Done Right” series. Browse the full series · Glossary Open a coverage report and four numbers stare back — Stmts, Branch, Funcs, Lines. Which one matters? This article is about reading that report: which number is honest (spoiler: branch), what to fill in from the red lines, and where to look for the team health that numbers can’t show. If you’ve been following the series, this is the hands-on follow-up to the strategy part’s point that “coverage is a reference, not a target.” First time here from a search? That’s fine too — we use Vitest, but reading a report works the same no matter which tool you’re on. ...

Published date: 2026-08-04 · Reading time: 7 min · Word count: 1354 words · Author: Isaac
mock, stub, spy — Understanding Test Doubles Properly thumbnail

mock, stub, spy — Understanding Test Doubles Properly

This is Part 6 of the “Frontend Testing, Done Right” series. Browse the full series · Glossary “I tested it with a mock” — that phrase actually bundles four different concepts (stub, spy, mock, fake) into one word. This single article sorts out those four terms, shows how one Vitest vi.fn() covers all of them, and settles the question of how far to go with faking. Sort it out once and your eye for reading and writing test code gets much sharper. ...

Published date: 2026-07-10 · Reading time: 12 min · Word count: 2548 words · Author: Isaac
Testing Async Code, Timers, and Errors thumbnail

Testing Async Code, Timers, and Errors

This is Part 5 of the “Frontend Testing, Done Right” series. Browse the full series · Glossary Real-world code waits. It waits for API responses; it waits for timers. That makes async testing the first wall most frontend developers hit — but the reason it feels hard boils down to a single question: “when do you verify?” Grade the answer sheet before the answer arrives, and you’re grading a blank page. This one article packs the complete toolkit for code that waits: Promise verification (resolves/rejects), fake timers, and the failure cases. ...

Published date: 2026-07-08 · Reading time: 9 min · Word count: 1745 words · Author: Isaac
Unit Testing Basics — Pure Functions, Edge Cases, and the AAA Pattern thumbnail

Unit Testing Basics — Pure Functions, Edge Cases, and the AAA Pattern

This is Part 4 of the “Frontend Testing, Done Right” series. Browse the full series · Glossary Unit tests are where all testing begins. You put one function in front of you and nail down “this input produces this output” — the smallest, fastest kind of verification there is. This one article takes you from what a unit test actually is, through pure functions, the AAA pattern, and edge cases, with real code all the way. ...

Published date: 2026-07-06 · Reading time: 11 min · Word count: 2318 words · Author: Isaac
Wiring Vitest into the Demo App — All the Way to the First Green Light thumbnail

Wiring Vitest into the Demo App — All the Way to the First Green Light

This is Part 3 of the “Frontend Testing, Done Right” series. Browse the full series · Glossary This is a start-to-finish walkthrough of wiring a testing environment into a React + Vite + TypeScript project — from an empty folder to the first passing test. We install Vitest, Testing Library, and jsdom, read the config line by line, turn the first test green, and map out where setup most often goes wrong. One article, complete setup. ...

맨 위로