Registry / testing / insta
library1.47.2rscratesunverified

A snapshot testing library for Rust, enabling easy comparison of test outputs against stored snapshots.

# Cargo.toml [dependencies] insta = "1.47.2"
INSTALL
IMPORT
SIG · INSTA
I
insta
testingrustv1.47.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

assert_snapshot
use insta::assert_snapshot;

Uses assert_snapshot! to compare a value against a stored snapshot.

use insta::assert_snapshot; fn main() { assert_snapshot!("Hello, world!"); }
Debug
Known issues
gotchaSnapshots are stored in a `snapshots` directory; forgetting to update them after intentional changes can cause test failures.
fix
Run `cargo insta review` or `cargo insta accept` to update snapshots after verifying changes.
affects: >=1.0.0
Upgrade
Version history
1.47.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
insta — cargo add insta · libregistry