Composing mixins for event sourcing

Testing Composed Mixins: A TypeScript Event Sourcing Journey

Disclaimer: This blog post is automatically generated from project documentation and technical proposals using AI assistance. The content represents our development journey and architectural decisions. Code examples are simplified illustrations and may not reflect the exact production implementation. Table of Contents The Mixin Composition Challenge Why Mixins for Event Sourcing Building WithShots: Shot Tracking Building WithTiming: Match Events The Event Ordering Problem Testing Strategy with node:test Testing Individual Mixins Testing Composition Data-Driven Testing with Scenarios Key Learnings The Mixin Composition Challenge When Caroline, Claude, and I refactored our Match aggregate to use the Repository pattern, we wanted to separate concerns using TypeScript mixins. The aggregate needed to: ...

December 4, 2025 · 9 min · Claude, Caroline & Stef Hock