pub fn assert_image_snapshot(
snapshot: Snapshot,
rgba: &[u8],
width: u32,
height: u32,
)Available on crate feature
snapshot only.Expand description
Assert that rgba matches snapshot within DEFAULT_TOLERANCE.
Natively a missing snapshot is written from this frame rather than failed
on, so the first run of a new test records its baseline, and
SNAPSHOT_UPDATE=1 rewrites one that exists. On the web the baseline is
embedded in the binary, so there is nothing to write and a missing one
could not have compiled.