summaryrefslogtreecommitdiff
path: root/Cargo.lock
diff options
context:
space:
mode:
authorThomas Otto <th1000s@posteo.net>2024-07-06 16:35:06 +0200
committerGitHub <noreply@github.com>2024-07-06 10:35:06 -0400
commit096941f77f28e21cbaad74eff3bbe7608ba4cbd8 (patch)
tree40f4dd85867b0ba75b0f23cb448100c2e371d305 /Cargo.lock
parentf5b37173fe88a62e37208a9587a0ab4fec0ef107 (diff)
tests: add insta for snapshot testing (#1739)
Insta makes writing new tests or performing changes which update the expected value(s) easier. The new reference data can be reviewed and inserted/updated automatically by `cargo insta review` (after `cargo install cargo-insta`, but that tool is optional). The snapshots are stored inline using the `@""` syntax and not in separate files because the delta test output is small and designed to be human readable. See https://insta.rs/#hello-snapshot-testing and https://docs.rs/insta/1.39.0/insta/
Diffstat (limited to 'Cargo.lock')
-rw-r--r--Cargo.lock19
1 files changed, 19 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 260c6a7..beb49b5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -515,6 +515,7 @@ dependencies = [
"dirs",
"git2",
"grep-cli",
+ "insta",
"itertools",
"lazy_static",
"palette",
@@ -643,6 +644,18 @@ dependencies = [
]
[[package]]
+name = "insta"
+version = "1.39.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5"
+dependencies = [
+ "console",
+ "lazy_static",
+ "linked-hash-map",
+ "similar",
+]
+
+[[package]]
name = "itertools"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1156,6 +1169,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
[[package]]
+name = "similar"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640"
+
+[[package]]
name = "siphasher"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"