{"repo":"mitsuhiko/insta","free":true,"listed":false,"github":"https://github.com/mitsuhiko/insta","clone":"git clone https://github.com/mitsuhiko/insta.git","description":"A snapshot testing library for rust","language":"Rust","stars":2947,"topics":["snapshot-tests","rust","vscode-extension"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"insta: a snapshot testing library for Rust Introduction Snapshots tests (also sometimes called approval tests) are tests that assert values against a reference value (the snapshot). This is similar to how assert eq! lets you compare a value against a reference value but unlike simple string assertions, snapshot tests let you test against complex values and come with comprehensive tools to review changes. Snapshot tests are particularly useful if your reference values are very large or change often. Example Curious? There is a screencast that shows the entire workflow: watch the insta introduction screencast. Or if you're not into videos, read the 5 minute introduction. Insta also supports inline snapshots which are stored right in your source file instead of separate files. This is accomplished by the companion cargo-insta tool. Editor Support For looking at .snap files there is a vscode extension which can syntax highlight snapshot files, review snapshots and more. It can be installed from the marketplace: view on marketplace. Diffing Insta uses similar for all its diffing operations. You can use it independently of insta. You can use the similar-asserts crate to get inline diffs for the standard assert eq! macro to achieve insta like diffs for regular comparisons: Sponsor If you like the project and find it useful you can become a sponsor. License and Links - Project Website - Documentation - Issue Tracker - License: Apache-2.0","default_branch":null,"files":null,"tree":[],"storefront":"/r/mitsuhiko","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mitsuhiko/insta/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}