89 releases (59 stable)

new 1.41.1 Oct 31, 2024
1.40.0 Sep 6, 2024
1.39.0 May 15, 2024
1.38.0 Mar 28, 2024
0.7.4 Mar 18, 2019

#110 in Cargo plugins

Download history 3208/week @ 2024-07-17 3096/week @ 2024-07-24 4339/week @ 2024-07-31 4361/week @ 2024-08-07 4456/week @ 2024-08-14 4501/week @ 2024-08-21 4284/week @ 2024-08-28 3826/week @ 2024-09-04 3511/week @ 2024-09-11 3294/week @ 2024-09-18 3201/week @ 2024-09-25 3124/week @ 2024-10-02 3258/week @ 2024-10-09 3001/week @ 2024-10-16 3489/week @ 2024-10-23 3728/week @ 2024-10-30

14,089 downloads per month
Used in 2 crates

Apache-2.0

455KB
11K SLoC

cargo-insta: review tool for insta, a snapshot testing library for Rust

cargo-insta provides a cargo command for insta snapshot reviews.

Starting with cargo-insta 1.38.0 you can install prebuild binaries for many platforms, you can also always just install them with cargo install manually.

Unix:

curl -LsSf https://insta.rs/install.sh | sh

Windows:

powershell -c "irm https://insta.rs/install.ps1 | iex"

To install a specific version (in this case 1.38.0):

Unix:

curl -LsSf https://github.com/mitsuhiko/insta/releases/download/1.38.0/cargo-insta-installer.sh | sh

Windows:

powershell -c "irm https://github.com/mitsuhiko/insta/releases/download/1.38.0/cargo-insta-installer.ps1 | iex"

You can also manually download the binaries here:

Alternatively you can manually build and install them. To install an old version ensure to pass the --locked flag so that the Cargo.lock file is honored:

$ cargo install cargo-insta --version 1.15.0 --locked

Usage

cargo-insta provides a few different commands to interact with insta snapshots.

For running tests you can use the test command, for reviewing snapshots review. The reviewing process is interactive and prompts for all changes identified. If you want to skip reviewing you can use accept and reject directly.

For more information refer to the documentation.

Dependencies

~11–21MB
~323K SLoC