Macro insta::assert_snapshot

source ยท
macro_rules! assert_snapshot {
    ($($arg:tt)*) => { ... };
}
Expand description

Asserts a string snapshot.

This is the simplest of all assertion methods. It accepts any value that implements fmt::Display.

// implicitly named
assert_snapshot!("reference value to snapshot");
// named
assert_snapshot!("snapshot_name", "reference value to snapshot");
// inline
assert_snapshot!("reference value", @"reference value");

Optionally a third argument can be given as an expression to be stringified as the debug expression. For more information on this, check out https://insta.rs/docs/snapshot-types/.