Testing React apps like it’s 2026
summary
Vitest 4 browser mode runs React Testing Library tests inside a real browser so single tests render in ~200ms and nine visual tests complete in ~3s, but tests share one iframe so localStorage, router state and DOM isolation are manual responsibilities. StoryBook’s new test runner converts stories to Vite tests for the same in‑IDE debugging. MSW now supports MSW source that generates mock responses from an OpenAPI contract so tests fail locally when the API changes (price number → object). New Playwright agents (planner generator healer) capture runtime network and console to auto‑fix failing tests.
AI-written summary · about
chapters (10)
- 0:00Testing React in 2026
- 1:09Limitations of current tools
- 5:44Vitest browser mode
- 8:55Vitest browser caveats
- 12:44Storybook testing features
- 15:34AI-driven testing workflows
- 17:19Minimizing AI testing work
- 21:35Playwright Testing Agent
- 25:06API mocking with MSW Source
- 30:31React testing paradigm shift
related talks
24mStorybook Vitest
27mVitest Browser Mode
29mThe 2025 State of JavaScript Testing
28mTesting Web Applications with Playwright
13mComponent Testing with Playwright for Vue
27mAnatomy of a Test Runner: What Vitest Keeps Getting Right
15mComponent Testing in 2026: The Return of the Browser
20mVitest: testing DX reimagined
