Skip to content
Mocking the Network with MSW — Isolating the API thumbnail

Mocking the Network with MSW — Isolating the API

This is Part 9 of the “Frontend Testing, Done Right” series. Browse the full series · Glossary The moment a component starts calling an API, tests get shaky. A slow server makes them slow, changed data breaks them, and offline they’re wiped out. MSW (Mock Service Worker) intercepts network requests at the boundary and returns prepared responses, solving the problem at its root. This one article covers installation, handlers, and simulating both success and failure. ...

Published date: 2026-07-14 · Reading time: 5 min · Word count: 2324 words · Author: Isaac
Testing Forms, Interaction, and State — with user-event thumbnail

Testing Forms, Interaction, and State — with user-event

This is Part 8 of the “Frontend Testing, Done Right” series. Browse the full series · Glossary A button isn’t really tested until you press it; an input, until you type into it. user-event is the member of the Testing Library family in charge of reproducing interaction — even a single click walks through focus changes and key-event order just like a real browser, closing the gap where “it works when a user does it, but not in the test.” In this article we build typing and clicking tests from scratch. ...

Published date: 2026-07-13 · Reading time: 6 min · Word count: 2745 words · Author: Isaac
The Testing Library Philosophy — Querying Like a User thumbnail

The Testing Library Philosophy — Querying Like a User

This is Part 7 of the “Frontend Testing, Done Right” series. Browse the full series · Glossary Testing Library is the de facto standard for component testing in React and beyond. But the real substance of this tool isn’t its API — it’s one philosophy. The moment you start testing components, temptations appear: “should I find it by class name? peek at internal state?” Testing Library answers firmly: do what the user does. In this article we’ll see what that philosophy means, the order for choosing queries, and why this approach is inseparable from accessibility — all while building a search component from scratch. ...

맨 위로