86 releases (56 stable)

new 1.39.0 May 15, 2024
1.38.0 Mar 28, 2024
1.35.1 Feb 19, 2024
1.34.0 Oct 9, 2023
0.7.4 Mar 18, 2019

#130 in Cargo plugins

Download history 3710/week @ 2024-01-24 2789/week @ 2024-01-31 2257/week @ 2024-02-07 2628/week @ 2024-02-14 2528/week @ 2024-02-21 4340/week @ 2024-02-28 4045/week @ 2024-03-06 2793/week @ 2024-03-13 3643/week @ 2024-03-20 4070/week @ 2024-03-27 4315/week @ 2024-04-03 5187/week @ 2024-04-10 5681/week @ 2024-04-17 2805/week @ 2024-04-24 2541/week @ 2024-05-01 2280/week @ 2024-05-08

14,266 downloads per month
Used in 3 crates

Apache-2.0

420KB
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

~9–20MB
~290K SLoC