How to Test Asynchronous Code
summary
Argues that asynchronous code becomes testable by making logic no IO and injecting test doubles, with tools: node-fake for mocks and node-microtest to run each test in a fresh V8 context so tests cannot perform IO. Demonstrates a small cat program driven to passing, reports product: ~6,000 lines of code with ~12,000 test lines, processing terabytes in production, close to 99% coverage and fewer than ten user-facing bugs, and shows the approach actually works.
AI-written summary · about
chapters (6)
- 0:00Start
- 8:26How to Test Asynchronous Code
- 9:14How to Microtest Node.js Code
- 9:50TDD
- 10:06Discipline
- 10:41Libraries








