Painless Testing of Event-Driven Architecture
summary
Shows concrete fixes: handler spies that resolve waits immediately, automatic transparent state reset for queues, dependency-injection patterns to start only needed consumers, and enforced validation schemas. Implements these in Node.js/TypeScript and in a message-queue-toolkit used at Lokalise. Tests become reliable and much faster — one consumer boots in ~40ms versus ~600ms for 20 — and the toolkit demonstrably reduces flakiness and boilerplate in live code examples.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:05Message Q Toolkit overview
- 2:29Talk structure
- 3:54Asynchronous testing challenges
- 4:56Unpredictable state in queues
- 7:47Unreliable awaits in tests
- 15:12Type safety in event systems
- 18:44Slow tests from bootstrapping
- 24:25Consumer instantiation complexity
- 26:51Message Q Toolkit evolution
- 28:59Transparent deletion demo
- 31:06Event definition demo
- 32:09Q&A








