insta
A snapshot testing library for Rust
1.48.0
91M downloads/mo
#852 most downloaded on crates.io
mitsuhiko/insta
What this package is like to depend on
Last release 2 months ago
11 Jun 2026
Release timing varies
gaps range from 1 weeks to 4 months
Most releases are documented
notes for 83 of 117 stable releases
2 versions withdrawn
withdrawn after publishing
8 years old
121 releases · first in 2019
15 releases in the last 12 months
see the full history below
Release timeline
121 releases · Jan 2019 to Jun 2026Releases
latest 60 of 121-
1.48.011 Jun 2026Release notes
Open source →Release Notes
- Add
strip_ansi_escape_codessetting which removes ANSI escape sequences
(color codes, cursor movement, etc.) from snapshot content before comparison.
Requires thefiltersfeature. #899 (@pierluigilenoci) - Add opt-in support for YAML literal blocks for multiline strings in snapshot
metadata fields such asdescriptionandexpression. Set
INSTA_YAML_BLOCK_STYLE=1to enable. #851 (@ivov) - Setting
CI=truenormally makescargo insta testbehave as though--check
was passed. Explicit snapshot handling options such as--acceptnow take
precedence over this environment variable, allowing users to override this
behavior if they want to. #924 - Fix
cargo insta test --profilebeing forwarded to nextest as the nextest
profile instead of the cargo build profile; it now translates to
--cargo-profilefor the nextest runner. Add--nextest-profileto select
the nextest profile. #910 - Fix
cargo insta pending-snapshotsprinting unusable\\?\-prefixed paths
on Windows. The--snapshotfilter now also accepts partial paths: any
trailing path suffix of the snapshot file matches, so a bare
--snapshot my_test.snapworks. #904 - Accepting a binary snapshot no longer fails with
os error 2when its data
file is missing (e.g. gitignored and not committed). #914
Install cargo-insta 1.48.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.48.0/cargo-insta-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.48.0/cargo-insta-installer.ps1 | iex"Download cargo-insta 1.48.0
File Platform Checksum cargo-insta-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum cargo-insta-x86_64-apple-darwin.tar.xz Intel macOS checksum cargo-insta-x86_64-pc-windows-msvc.zip x64 Windows checksum cargo-insta-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum cargo-insta-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum Release notes
Open source →- Add
strip_ansi_escape_codessetting which removes ANSI escape sequences (color codes, cursor movement, etc.) from snapshot content before comparison. Requires thefiltersfeature. #899 (@pierluigilenoci) - Add opt-in support for YAML literal blocks for multiline strings in snapshot
metadata fields such as
descriptionandexpression. SetINSTA_YAML_BLOCK_STYLE=1to enable. #851 (@ivov) - Setting
CI=truenormally makescargo insta testbehave as though--checkwas passed. Explicit snapshot handling options such as--acceptnow take precedence over this environment variable, allowing users to override this behavior if they want to. #924 - Fix
cargo insta test --profilebeing forwarded to nextest as the nextest profile instead of the cargo build profile; it now translates to--cargo-profilefor the nextest runner. Add--nextest-profileto select the nextest profile. #910 - Fix
cargo insta pending-snapshotsprinting unusable\\?\-prefixed paths on Windows. The--snapshotfilter now also accepts partial paths: any trailing path suffix of the snapshot file matches, so a bare--snapshot my_test.snapworks. #904 - Accepting a binary snapshot no longer fails with
os error 2when its data file is missing (e.g. gitignored and not committed). #914
- Add
-
1.47.230 Mar 2026Release notes
Open source →Release Notes
- Restore
Send + SynconSettings,Redactions, andRedactionby
reverting theArctoRcchange from 1.47.0, which was semver-breaking.
#873 #874 - Add
Send + Syncbounds toComparatortrait for consistency with
Arc-based storage. #872 - Add compile-time assertion to prevent future auto-trait regressions.
Install cargo-insta 1.47.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.47.2/cargo-insta-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.47.2/cargo-insta-installer.ps1 | iex"Download cargo-insta 1.47.2
File Platform Checksum cargo-insta-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum cargo-insta-x86_64-apple-darwin.tar.xz Intel macOS checksum cargo-insta-x86_64-pc-windows-msvc.zip x64 Windows checksum cargo-insta-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum cargo-insta-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum Release notes
Open source →- Restore
Send + SynconSettings,Redactions, andRedactionby reverting theArctoRcchange from 1.47.0, which was semver-breaking. #873 #874 - Add
Send + Syncbounds toComparatortrait for consistency withArc-based storage. #872 - Add compile-time assertion to prevent future auto-trait regressions.
- Restore
-
1.47.129 Mar 2026Release notes
Open source →Release Notes
- Revert sorting of sequences in
sort_maps. The change in 1.47.0 sorted all
Seqvalues (includingVec), not just non-deterministic collections like
HashSet, which was a breaking change. #876
Install cargo-insta 1.47.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.47.1/cargo-insta-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.47.1/cargo-insta-installer.ps1 | iex"Download cargo-insta 1.47.1
File Platform Checksum cargo-insta-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum cargo-insta-x86_64-apple-darwin.tar.xz Intel macOS checksum cargo-insta-x86_64-pc-windows-msvc.zip x64 Windows checksum cargo-insta-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum cargo-insta-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum Release notes
Open source →- Revert sorting of sequences in
sort_maps. The change in 1.47.0 sorted allSeqvalues (includingVec), not just non-deterministic collections likeHashSet, which was a breaking change. #876
- Revert sorting of sequences in
-
1.47.027 Mar 2026Release notes
Open source →Release Notes
- Add
Comparatortrait for customizing how snapshot values are compared. #872 (@dstu) - Sort sequences in
sort_mapsto fix non-deterministicHashSetsnapshots. #876 - Improve TOML serialization error message for unsupported types, suggesting
assert_json_snapshot!orassert_yaml_snapshot!as alternatives. #880 - Remove unnecessary
Send + Syncbounds fromRedaction, allowing non-Sendclosures in dynamic redactions. #874 - Don't use
ArcinSettingsunnecessarily. #873 (@dstu) - Upgrade
consoleto 0.16 and MSRV to 1.66. #885 - Upgrade
toml-editto 0.25. #882 (@alexanderkjall)
Install cargo-insta 1.47.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.47.0/cargo-insta-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.47.0/cargo-insta-installer.ps1 | iex"Download cargo-insta 1.47.0
File Platform Checksum cargo-insta-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum cargo-insta-x86_64-apple-darwin.tar.xz Intel macOS checksum cargo-insta-x86_64-pc-windows-msvc.zip x64 Windows checksum cargo-insta-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum cargo-insta-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum Release notes
Open source →- Add
Comparatortrait for customizing how snapshot values are compared. #872 (@dstu) - Sort sequences in
sort_mapsto fix non-deterministicHashSetsnapshots. #876 - Improve TOML serialization error message for unsupported types, suggesting
assert_json_snapshot!orassert_yaml_snapshot!as alternatives. #880 - Remove unnecessary
Send + Syncbounds fromRedaction, allowing non-Sendclosures in dynamic redactions. #874 - Don't use
ArcinSettingsunnecessarily. #873 (@dstu) - Upgrade
consoleto 0.16 and MSRV to 1.66. #885 - Upgrade
toml-editto 0.25. #882 (@alexanderkjall)
- Add
-
1.46.302 Feb 2026Release notes
Open source →Release Notes
- Fix inline escaped snapshots incorrectly stripping leading newlines when content contains control characters like carriage returns. The escaped format (used for snapshots with control chars) now correctly preserves the original content without stripping a non-existent formatting newline. #865
Install cargo-insta 1.46.3
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.46.3/cargo-insta-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.46.3/cargo-insta-installer.ps1 | iex"Download cargo-insta 1.46.3
File Platform Checksum cargo-insta-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum cargo-insta-x86_64-apple-darwin.tar.xz Intel macOS checksum cargo-insta-x86_64-pc-windows-msvc.zip x64 Windows checksum cargo-insta-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum cargo-insta-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum Release notes
Open source →- Fix inline escaped snapshots incorrectly stripping leading newlines when content contains control characters like carriage returns. The escaped format (used for snapshots with control chars) now correctly preserves the original content without stripping a non-existent formatting newline. #865
-
1.46.231 Jan 2026Release notes
Open source →Release Notes
- Fix inline snapshot corruption with carriage returns. The
leading_space()function incorrectly treated\ras indentation, causing carriage returns to be stripped from snapshot content. #866 - Remove
< 0.4.17upper bound on globset dependency. #864
Install cargo-insta 1.46.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.46.2/cargo-insta-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.46.2/cargo-insta-installer.ps1 | iex"Download cargo-insta 1.46.2
File Platform Checksum cargo-insta-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum cargo-insta-x86_64-apple-darwin.tar.xz Intel macOS checksum cargo-insta-x86_64-pc-windows-msvc.zip x64 Windows checksum cargo-insta-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum cargo-insta-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum Release notes
Open source →- Fix inline snapshot corruption with carriage returns. The
leading_space()function incorrectly treated\ras indentation, causing carriage returns to be stripped from snapshot content. #866 - Remove
< 0.4.17upper bound on globset dependency. #864
- Fix inline snapshot corruption with carriage returns. The
-
1.46.115 Jan 2026Release notes
Open source →Release Notes
- Fix inline snapshot corruption when multiple snapshots appear inside
with_settings!macro. #858
Install cargo-insta 1.46.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.46.1/cargo-insta-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.46.1/cargo-insta-installer.ps1 | iex"Download cargo-insta 1.46.1
File Platform Checksum cargo-insta-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum cargo-insta-x86_64-apple-darwin.tar.xz Intel macOS checksum cargo-insta-x86_64-pc-windows-msvc.zip x64 Windows checksum cargo-insta-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum cargo-insta-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum Release notes
Open source →- Fix inline snapshot corruption when multiple snapshots appear inside
with_settings!macro. #858
- Fix inline snapshot corruption when multiple snapshots appear inside
-
1.46.003 Jan 2026Release notes
Open source →Release Notes
- Add
INSTA_PENDING_DIRenvironment variable for Bazel and other hermetic build systems. When set, pending snapshots are written to a separate directory while keeping the source tree read-only. We are very open to feedback on this feature. #852 - Fix documentation for
test.runner_fallbackconfig key. #853
Install cargo-insta 1.46.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.46.0/cargo-insta-installer.ps1 | iex"Download cargo-insta 1.46.0
File Platform Checksum cargo-insta-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum cargo-insta-x86_64-apple-darwin.tar.xz Intel macOS checksum cargo-insta-x86_64-pc-windows-msvc.zip x64 Windows checksum cargo-insta-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum cargo-insta-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum Release notes
Open source →- Add
INSTA_PENDING_DIRenvironment variable for Bazel and other hermetic build systems. When set, pending snapshots are written to a separate directory while keeping the source tree read-only. We are very open to feedback on this feature. #852 - Fix documentation for
test.runner_fallbackconfig key. #853
- Add
-
1.45.129 Dec 2025Release notes
Open source →Release Notes
- Fix backward compatibility with TOML format produced by insta < 1.45.0. #849 (@chitoku-k)
Install cargo-insta 1.45.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.45.1/cargo-insta-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.45.1/cargo-insta-installer.ps1 | iex"Download cargo-insta 1.45.1
File Platform Checksum cargo-insta-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum cargo-insta-x86_64-apple-darwin.tar.xz Intel macOS checksum cargo-insta-x86_64-pc-windows-msvc.zip x64 Windows checksum cargo-insta-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum cargo-insta-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum Release notes
Open source →- Fix backward compatibility with TOML format produced by insta < 1.45.0. #849 (@chitoku-k)
-
1.45.018 Dec 2025Release notes
Open source →Release Notes
- Add external diff tool support via
INSTA_DIFF_TOOLenvironment variable. When set, insta uses the specified tool (e.g.,delta,difftastic) to display snapshot diffs instead of the built-in diff. The tool is invoked as<tool> <old_file> <new_file>. #844 - Add
test.disable_nextest_doctestconfig option toinsta.yaml, allowing users to silence the nextest doctest warning via config instead of passing--dndevery time. #842 - Skip non-insta snapshot files in unreferenced detection. Projects using both insta and other snapshot tools (like vitest or jest) can now use
--unreferenced=rejectwithout false positives on.snapfiles from other tools. #846 - Collect warnings from tests for display after run. Ensures deprecation warnings are visible even when nextest suppresses stdout/stderr from passing tests. #840
- Update TOML serialization to be up-to-date and backwards-compatible. #834
- Support
clippy::needless_raw_stringslint by only using raw strings when content contains backslashes or quotes. #828
Install cargo-insta 1.45.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.45.0/cargo-insta-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/insta/releases/download/1.45.0/cargo-insta-installer.ps1 | iex"Download cargo-insta 1.45.0
File Platform Checksum cargo-insta-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum cargo-insta-x86_64-apple-darwin.tar.xz Intel macOS checksum cargo-insta-x86_64-pc-windows-msvc.zip x64 Windows checksum cargo-insta-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum cargo-insta-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum Release notes
Open source →- Add external diff tool support via
INSTA_DIFF_TOOLenvironment variable. When set, insta uses the specified tool (e.g.,delta,difftastic) to display snapshot diffs instead of the built-in diff. The tool is invoked as<tool> <old_file> <new_file>. #844 - Add
test.disable_nextest_doctestconfig option toinsta.yaml, allowing users to silence the nextest doctest warning via config instead of passing--dndevery time. #842 - Skip non-insta snapshot files in unreferenced detection. Projects using both insta and other snapshot tools (like vitest or jest) can now use
--unreferenced=rejectwithout false positives on.snapfiles from other tools. #846 - Collect warnings from tests for display after run. Ensures deprecation warnings are visible even when nextest suppresses stdout/stderr from passing tests. #840
- Update TOML serialization to be up-to-date and backwards-compatible. #834 (@spoutn1k)
- Support
clippy::needless_raw_stringslint by only using raw strings when content contains backslashes or quotes. #828
- Add external diff tool support via
-
1.44.327 Nov 2025Release notes
Open source →- Fix a regression in 1.44.2 where merge conflict detection was too aggressive, incorrectly flagging snapshot content containing
======or similar patterns as conflicts. #832 - Fix a regression in 1.42.2 where inline snapshot updates would corrupt the file when code preceded the macro (e.g.,
let output = assert_snapshot!(...)). #833
- Fix a regression in 1.44.2 where merge conflict detection was too aggressive, incorrectly flagging snapshot content containing
-
1.44.227 Nov 2025Release notes
Open source →- Fix a rare backward compatibility issue where inline snapshots using an uncommon legacy format (single-line content stored in multiline raw strings) could fail to match after 1.44.0. #830
- Handle merge conflicts in snapshot files gracefully. When a snapshot file contains git merge conflict markers, insta now detects them and treats the snapshot as missing, allowing tests to continue and create a new pending snapshot for review. #829
- Skip nextest_doctest tests when cargo-nextest is not installed. #826
- Fix functional tests failing under nextest due to inherited
NEXTEST_RUN_IDenvironment variable. #824
-
1.44.120 Nov 2025Release notes
Open source →- Add
--dndalias for--disable-nextest-doctestflag to make it easier to silence the deprecation warning. #822 - Update cargo-dist to 0.30.2 and fix Windows runner to use windows-2022. #821
- Add
-
1.44.020 Nov 2025Release notes
Open source →- Added non-interactive snapshot review and reject modes for use in non-TTY environments
(LLMs, CI pipelines, scripts).
cargo insta review --snapshot <path>andcargo insta reject --snapshot <path>now work without a terminal. Enhancedpending-snapshotsoutput with usage instructions and workspace-relative paths. #815 - Add
--disable-nextest-doctestflag tocargo insta testto disable running doctests with nextest. Shows a deprecation warning when nextest is used with doctests without this flag, to preparecargo instato no longer run a separate doctest process when using nextest in the future. #803 - Add ergonomic
--test-runner-fallback/--no-test-runner-fallbackflags tocargo insta test. #811 - Apply redactions to snapshot metadata. #813
- Remove confusing 'previously unseen snapshot' message. #812
- Speed up JSON float rendering. #806 (@nyurik)
- Allow globset version up to 0.4.16. #810 (@g0hl1n)
- Improve documentation. #814 (@tshepang)
- We no longer trim starting newlines during assertions, which allows asserting
the number of leading newlines match. Existing assertions with different
leading newlines will pass and print a warning suggesting running with
--force-update-snapshots. They may fail in the future. (Note that we still currently allow differing trailing newlines, though may adjust this in the future). #563
- Added non-interactive snapshot review and reject modes for use in non-TTY environments
(LLMs, CI pipelines, scripts).
-
1.43.204 Sep 2025Release notes
Open source →- Fix panics when
cargo metadatafails to execute or parse (e.g., when cargo is not in PATH or returns invalid output). Now falls back to using the manifest directory as the workspace root. #798 (@adriangb) - Fix clippy
uninlined_format_argslint warnings. #801 - Changed diff line numbers to 1-based indexing. #799
- Preserve snapshot names with
INSTA_GLOB_FILTER. #786 - Bumped
libccrate to0.2.174, fixing building on musl targets, and increasing the MSRV ofinstato1.64.0(released Sept 2022). #784 - Fix clippy 1.88 errors. #783
- Fix source path in snapshots for non-child workspaces. #778
- Add lifetime to Selector in redaction iterator. #779
- Fix panics when
-
1.43.129 Apr 2025Release notes
Open source →This release in identical in rust code to 1.43.0, but reruns the GitHub Actions workflows, which failed to create a release within GitHub for 1.43.0.
-
1.43.025 Apr 2025Release notes
Open source →- Add uppercase keyboard shortcuts for bulk operations in
cargo insta review:Ato accept all,Rto reject all, andSto skip all remaining snapshots. #745 --unreferenced=auto(or other relevant values) no longer cleans up pending snapshots. A bug wherecargo insta test --unreferenced=autowould incorrectly pass on new pending snapshots has been fixed.- Support specifying
cargo-nextestbin withINSTA_CARGO_NEXTEST_BIN. #721 (Louis Fruleux) - Allow setting
INSTA_WORKSPACE_ROOTat compile time. This is useful for reproducible binaries so they don't contain references toCARGO_MANIFEST_DIR. #726 (Pascal Bach) - Qualify all references in macros to avoid name clashes. #729 (Austin Schey)
- Remove
linked-hash-mapandpin-projectdependencies. #742, #741, #738 cargo insta reviewfails with a helpful error message when run in a non-TTY environment.
- Add uppercase keyboard shortcuts for bulk operations in
-
1.42.202 Mar 2025Release notes
Open source →- Support other indention characters than spaces in inline snapshots. #679
- Fix an issue where multiple targets with the same root would cause too many pending snapshots to be reported. #730
- Hide
unseenoption in CLI, as it's pending deprecation. #732 - Stop
\tand\x1b(ANSI color escape) from causing snapshots to be escaped. #715 - Improved handling of inline snapshots within
allow_duplicates! { .. }. #712
-
1.42.125 Jan 2025Release notes
Open source →- Improved handling of control characters in inline snapshots. #713
- Add pending deprecation warning for
--accept-unseen. We've left an issue open at https://github.com/mitsuhiko/insta/issues/659 eliciting feedback on whether anyone uses this for a few months. A warning will now be printed when--accept-unseenis used, and we'll eventually remove the feature unless we get some feedback that it's useful. #668
-
1.42.005 Jan 2025Release notes
Open source →- Text snapshots no longer contain
snapshot_type: textin their metadata. For context, we originally added this in the prior release (1.41.0) to support binary snapshots, but some folks disliked the diff noise on any snapshot changes, and the maintainers' weighted votes favored reverting. I apologize that this will cause some additional churn for those who usedcargo insta test --force-update-snapshotsto update their snapshots to the 1.41 format; running this again with 1.42 will remove those metadata entries. To confirm: this doesn't affect whether snapshot tests pass or fail — the worst impact is some additional diffs in metadata. #690 - Pending snapshots are no longer removed throughout the workspace by
cargo-instabefore running tests. Instead, running a test will overwrite or remove its own pending snapshot. To remove all pending snapshots, usecargo insta rejector run tests with--unreferenced=delete. #651 insta::internals::SettingsBindDropGuard(returned fromSettings::bind_to_scope) no longer implementsSend. This was incorrect and any tests relying on this behavior where not working properly. Fixes #694 in #695 by @jalil-salame
- Text snapshots no longer contain
-
1.41.131 Oct 2024 -
1.41.027 Oct 2024Release notes
Open source →-
Experimental support for binary snapshots. #610 (Florian Plattner)
-
--force-update-snapshotsnow causescargo-instato write every snapshot, regardless of whether snapshots fully match, and now implies--accept. This allows for--force-update-snapshotsto update inline snapshots' delimiters and indentation.For the previous behavior of
--force-update-snapshots, which limited writes to snapshots which didn't fully match, use--require-full-match. The main difference between--require-full-matchand the existing behavior of--force-update-snapshotsis a non-zero exit code on any snapshots which don't fully match.Like the previous behavior of
--force-update-snapshots,--require-full-matchdoesn't track inline snapshots' delimiters or indentation, so can't update if those don't match. #644 -
Inline snapshots only use
#characters as delimiters when required. #603 -
Warnings for undiscovered snapshots are more robust, and include files with custom snapshot extensions. #637
-
Insta runs correctly on packages which reference rust files in a parent path. #626
-
Warnings are printed when any snapshot uses a legacy format. #599
-
cargo insta --versionnow prints a version. #665 -
instanow internally usesINSTA_UPDATE=forcerather thanINSTA_FORCE_UPDATE=1. (This doesn't affect users ofcargo-insta, which handles this internally.) #482 -
cargo-insta's integration tests continue to grow over the past couple of versions, and now offer coverage of most ofcargo-insta's interface.
-
-
1.40.006 Sep 2024Release notes
Open source →-
cargo-instano longer panics when runningcargo insta test --accept --workspaceon a workspace with a default crate. #532 -
MSRV for
instahas been raised to 1.60, and forcargo-instato 1.64. -
Added support for compact debug snapshots (
assert_compact_debug_snapshot). #514 -
Deprecate
--no-force-passincargo-insta. The--checkoption covers the same functionality and has a clearer name. #513 -
Inline snapshots now use the required number of
#s to escape the snapshot value, rather than always using###. This allows snapshotting values which themselves contain###. If there are no existing#characters in the snapshot value, a single#will be used. #540 -
Inline snapshots can now be updated with
--force-update-snapshots. #569 -
cargo insta testaccepts multiple--excludeflags. #520 -
testrunnerin insta's yaml config works. #544 -
Print a warning when encountering old snapshot formats. #503
-
Group the options in
cargo insta --help, upgrade toclapfromstructopt. #518 -
No longer suggest running
cargo instamessage when runningcargo insta test --check. #515 -
Print a clearer error message when accepting a snapshot that was removed. #516
-
Mark
require-full-matchas experimental, given some corner-cases are currently difficult to manage. #497 -
Add a new integration test approach for
cargo-instaand a set of integration tests. #537 -
Enable Filters to be created from
IntoIteratortypes, rather than justVecs. #570 -
Implemented total sort order for an internal
Keytype correctly. This prevents potential crashes introduced by the new sort algorithm in Rust 1.81. #586
-
-
1.39.015 May 2024Release notes
Open source →-
Fixed a bug in
require_full_match. #485 -
Fixed a bug that caused snapshot and module names to sometimes be inaccurate. #483
-
Insta will no longer error when attempting to remove snapshots that were already removed. #484
-
Added support for trailing commas in inline snapshots. #472
-
Don't pass
--colorin all cases tolibtestany more to work around limitations with custom test harnesses. #491
-
-
1.38.028 Mar 2024Release notes
Open source →-
Filtersis now constructible fromIntoIterator. #400 -
Change
stdmacro calls to be fully qualified. This fixes issues where the prelude was not used or the macros were overridden. #469
-
-
1.37.026 Mar 2024Release notes
Open source →-
All macros for file snapshots should now handle trailing commas (but not yet inline snapshots)
-
Vendored old
yaml-rustdependency to avoid rustsec warnings. #465
-
-
1.36.104 Mar 2024Release notes
Open source →- Fix an ownership issue introduced in 1.36 with snapshot assertions. #453
-
1.36.003 Mar 2024Release notes
Open source →-
Deprecate
INSTA_FORCE_UPDATE_SNAPSHOTSenv-var forINSTA_FORCE_UPDATE. The latter was documented, the former was implemented. #449 -
Add
require_full_matchoption. #448 -
Deprecate
assert_display_snapshot!. #385
-
-
1.35.119 Feb 2024 -
1.35.019 Feb 2024Release notes
Open source →- Fixed a crash when a file named
.configwas in the root. - Added new alternative
match .. { ... }syntax to redactions for betterrustfmtsupport. (#428) - The
--packageparameter can be supplied multiple times now. (#427) - Leading newlines in snapshots are now ignored to resolve issues with inline snapshots that were never able to match. (#444)
cargo insta testnow accepts the--testparameter multiple times. (#437)
- Fixed a crash when a file named
-
1.34.009 Oct 2023Release notes
Open source →- Snapshots are now sorted in the UI on review. (#413)
- Re-organized repository to move
cargo-instainto a workspace. (#410) - Fixed handling of
--manifest-pathwith regards to virtual workspaces. (#409)
-
1.33.028 Sep 2023 -
1.32.020 Sep 2023 -
1.31.014 Jul 2023Release notes
Open source →- Fixed a bug that caused
cargo insta testnot to report test failures. - Suppress
needless_raw_string_hashesclippy lint on inline snapshots. (#390)
- Fixed a bug that caused
-
1.30.022 Jun 2023Release notes
Open source →- Resolved a bug on Windows that caused
input_filenot to be written into the snapshots. (#386) - Snapshots are accepted when running with
--accepteven if a test outside insta fails. (#358) - Mark settings drop guard as
#[must_use]. - Write inline snapshots with atomic rename to avoid some rare races. (#373)
- Pass
--color=...to libtest to propagate color choices in more situations. (#375)
- Resolved a bug on Windows that caused
-
1.29.023 Mar 2023Release notes
Open source →- Fixed a rendering bug with snapshot display (lines were not rendered to the terminal width).
- Added
--excludeoption tocargo insta test. (#360) - Inherit
coloroption from aCARGO_TERM_COLORenvironment variable (#361)
-
1.28.016 Feb 2023Release notes
Open source →- Added
allow_duplicates!to enable multiple assertions for a single snapshot. (#346) - Ensure that expressions formatted with
rustfmtuse unix newlines. - Added a way to disable diffing in review. (#348)
- Added three argument version of
glob!to set a different base path. (#347) - Added
rounded_redactionto truncate floating point values. (#350)
- Added
-
1.26.006 Jan 2023 -
1.24.104 Jan 2023Release notes
Open source →- Fix non working
--include-hiddenflag (#331) - Fix incorrect mapping of
review.include_ignored(#330)
- Fix non working
-
1.24.003 Jan 2023Release notes
Open source →- Added an insta tool config (
.config/insta.yaml) to change the behavior of insta and cargo-insta. (#322) - Renamed
--no-ignoreto--include-ignored. - Added
--include-hiddento instruct insta to also walk into hidden paths. - Added new
--unreferencedoption tocargo-insta testwhich allows fine tuning of what should happen with unreferenced files. It's now possible to ignore (default), warn, reject or delete unreferenced snapshots. (#328) - Resolved an error message about doc tests when using nextest with test targeting. (#317)
- Added an insta tool config (
-
1.23.011 Dec 2022Release notes
Open source →- Add a hint if snapshots might be skipped. (#314)
- Avoid extra newline in YAML snapshots. (#311)
-
1.22.003 Dec 2022Release notes
Open source →- Added support for rendering some invisibles in diffs. This now also should make sure that ANSI sequences in strings are no longer screwing up the terminal output. (#308)
- Prevent inline snapshots to be used in loops. (#307)
- Support the
--targetoption tocargo insta test. (#309) - Globbing now adds directories as disambiguators into the snapshot
suffixes. This allows patterns such as
foo/*/*.txtwithout creating conflicts. (#310)
-
1.21.227 Nov 2022Release notes
Open source →- Added missing parameters to
cargo insta test. (#305) - Fixed a sorting issue in hash maps for compound keys. (#304)
- Added missing parameters to
-
1.21.114 Nov 2022 -
1.21.028 Sep 2022Release notes
Open source →- Fixed an issue that broke support for older rust versions. (#292)
- Added
cargo insta showcommand to render a snapshot. - Added support for compact JSON snapshots. (#288)
-
1.20.017 Sep 2022Release notes
Open source →cargo instanow supports nextest as test runner. (#285)- The
glob!macro now defers failures by default. (#284)
-
1.19.131 Aug 2022Release notes
Open source →- Added support for numeric keys in JSON which regressed in 0.18.0. (#281)
-
1.19.021 Aug 2022Release notes
Open source →- Removed
backtracefeature. - Removed
serializationfeature. assert_json_snapshot!andassert_yaml_snapshot!now require thejsonandyamlfeature respectively.- Doctests now emit a warning that inline snapshot updating is not supported (#272)
- Added support for
INSTA_GLOB_FILTERto skip over tests expanded from a glob. (#274)
- Removed
-
1.18.211 Aug 2022 -
1.18.109 Aug 2022Release notes
Open source →- Fixed a regression in the JSON serialization format with newtypes and tuple variants. (#270)
-
1.18.008 Aug 2022Release notes
Open source →Settings::bindnow can return a result.- Expose the drop guard type of
bind_to_scope. - The
serdedependency is now optional. While still enabled by default users need to opt intoyamlandjsonfeatures explicitly to regain support for it. To avoid the defaultserdedependency the default features just need to be disabled. (#255) - Deprecated unused
serializationfeatures. - Deprecated unused
backtracefeature. - Removed deprecated
Settings::bind_to_thread.
Breaking Changes / Upgrading: If you are upgrading to serde 1.18.0 you will receive deprecating warnings if you are using the
assert_yaml_snapshot!andassert_json_snapshot!macros. These macros will continue to function in the future but they will require explicit opting into theyamlandjsonfeatures. To silence the warning add them to yourinstadependency. Additionally thebacktracefeature was deprecated. It is no longer needed so just remove it. -
1.18.0-alpha.107 Aug 2022 pre-releaseNothing published for this version
-
1.17.206 Aug 2022 -
1.17.130 Jul 2022Release notes
Open source →- Added support for nextest. (#242)
- Resolved an issue where inline snapshot tests in doctests refused to work. (#252)
-
1.17.027 Jul 2022Release notes
Open source →- Fixed an issue in
cargo-instawhere sometimes accepting inline snapshots would crash with an out of bounds panic. - Added new
filtersfeature. (#245) - Disallow unnamed snapshots in doctests. (#246)
with_settings!macro now inherits the former settings rather than resetting. (#249)- Added support for
Settings::bind_to_scopeand deprecatedSettings::bind_to_thread. (#250) - Added support for
minimal-versionsbuilds.
- Fixed an issue in
-
1.16.021 Jul 2022Release notes
Open source →- Added
--no-quiet/-Qflag tocargo insta testto suppress the quiet flag. This works around limitations with custom test harnesses such as cucumber. - Update RON to 0.7.1.
- Improved ergonomics around
with_settings!. It's now a perfect match to the settings object's setter methods. - Added
descriptionandinfoto snapshots. (#239) - Added
omit_expressionsetting. (#239) - Added improved support for running insta from doctests. (#243)
- Added
-
1.15.017 Jun 2022Release notes
Open source →- Bump minimum version of Rust to 1.56.1. This was done because the used serde-yaml dependency no longer supports older versions of Rust.
-
1.14.131 May 2022Release notes
Open source →- Update uuid crate to 1.0.0. (#228)
- Use inline block format also for strings of form
"foo\n". (#225)
-
1.14.026 Mar 2022Release notes
Open source →- Fixed a bug that caused insta to panic if inline snapshot assertions moved since the time of the snapshot creation. (#220)
cargo insta testnow returns non zero status code when snapshots are left for review. (#222)- Assertion failures now mention
cargo insta test. (#223)
-
1.13.004 Mar 2022Release notes
Open source →- Fixed a bug where an extra newline was emitted following the snapshot header.
assertion_lineis no longer retained in snapshots. (#218)