Calque.Snapshot (calque v1.3.1)
View SourceRepresents a snapshot — a saved version of output data used by Calque’s snapshot testing system.
A snapshot encapsulates:
:title— A human-readable identifier, often matching the test name.:content— The stringified output captured during the test run.:status— Either:new(freshly generated and unreviewed) or:accepted(already validated and stored).
This module provides simple constructors to ensure consistent initialization:
new/2— Creates a new, unaccepted snapshot.accepted/2— Builds an accepted snapshot loaded from disk.
Snapshots are immutable data structures; their lifecycle and comparison logic
are handled by higher-level modules such as Calque and Calque.Diff.