All you need is a contract
summary
Claims that using TanStack Query plus Mock Service Worker removes three concrete problems: unmaintainable server‑state code, flaky network tests, and blocked frontend work during sprints. The team deletes manual mocks and Axios mock adapter, writes request handlers (request/response resolvers), and calls setupServer/setupWorker to start interception. Tests stop flaking, no separate mock server is needed, frontend and backend work in parallel, and the sprint finishes earlier with higher confidence and less maintenance.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:12Developers hate code
- 3:16Unmaintainable code monster
- 5:04React Query harmony
- 6:05Unmaintainable tests Hydra
- 7:31Server state struggle
- 10:00Mock Service Worker fundamentals
- 16:21Mock Service Worker fixes tests
- 17:47Why not mock server
- 20:15Mock Service Worker solves delays
- 24:09Live demo Mock Service Worker
- 27:44Key lessons
- 29:51All you need is a contract
related talks
34mSchema-Driven Testing with Mock Service Worker
33mGraphQL mocking and why it is important for developer productivity.
37mStop Doing E2E Tests! Write Better Tests with Contract
40mStrategic Business Functionality Testing: Accelerating Development Through Mocking
22mA Mock Is a Promise: Making GraphQL Mocks Enforceable
42mFree Your Frontend Client from Backend Cage
25mMock to start
45mTesting Big in JavaScript
