DebugSnapshots is a new Swift library that enables exhaustive testing of reference types like @Observable classes. By applying the @DebugSnapshot macro, developers get a test-friendly snapshot of a class's underlying data and can use the expect function to assert exactly how state changes after actions. The library handles private, underscored, and computed properties intelligently, and supports nested model snapshots via @DebugSnapshotConvertible. It fills a gap previously only addressed for value types, bringing exhaustive state-change assertions to class-based models.
Sort: