metamon/annotate
Add per-property context that is only displayed when the property fails. Successful runs discard all annotations so the cost is zero in the happy path.
The runner clears state at the start of every run and reads any remaining state on failure.
Values
pub fn annotate(message: String) -> Nil
Add a free-form message to the current property’s annotation buffer. Successful runs discard the buffer, so this is cheap.
pub fn annotate_value(label: String, value: a) -> Nil
Pretty-print value and add it to the annotation buffer with a
human-readable label. The output uses Gleam’s string.inspect so it
works on any type.
pub fn current_annotations() -> List(String)
Read the annotations recorded since the last reset. Order is the
order in which they were registered.
pub fn current_footnotes() -> List(String)
Read the footnotes recorded since the last reset.
pub fn footnote(message: String) -> Nil
Add a short message to the footnote buffer (printed at the bottom of the failure report).