In this episode of Zed Decoded, Nathan and Antonio dive into property-based testing without any frameworks. Just pure, no-frills randomized testing built from scratch.
We cover:
- Why property-based testing became essential after painful bugs in Atom
- How fixing random seeds enables reproducible test failures
- Testing the rope data structure by comparing it against a simple reference implementation
- Asserting invariants across hundreds of thousands of random operations
- Running integration tests that simulate entire client-server interactions with controlled network delays
- Building a custom async executor that makes non-deterministic behavior deterministic
- How Rust's futures and zero-cost abstractions enable total control over test execution
This approach gave us confidence to ship a high-performance editor written in Rust. Whether you're working on performance-critical systems or tired of flaky tests, this episode shows how randomized testing with deterministic scheduling can level up your development workflow.