cargo-insta

Crates.iocargo-insta
lib.rscargo-insta
version1.41.1
sourcesrc
created_at2019-01-18 08:11:25.634677
updated_at2024-10-31 18:29:52.341942
descriptionA review tool for the insta snapshot testing library for Rust
homepagehttps://insta.rs/
repositoryhttps://github.com/mitsuhiko/insta
max_upload_size
id109296
size173,199
Maximilian Roos (max-sixty)

documentation

https://insta.rs/docs/cli/

README

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.

License and Links

Commit count: 862

cargo fmt