From 7084ca1be2c14e850e68707d253890adb9b8a37d Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Mon, 15 Dec 2025 20:16:10 -0700 Subject: [PATCH] ci: Added more aliases and commands to the Justfile for snapshot tests --- justfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/justfile b/justfile index 8394fed..c64cf55 100644 --- a/justfile +++ b/justfile @@ -53,11 +53,13 @@ doctest: proptest: @cargo test proptest +alias test-snapshots := snapshot-tests # Run all snapshot tests [group: 'test'] snapshot-tests: @cargo test snapshot +alias review := snapshot-review # Review snapshot test changes [group: 'test'] @snapshot-review: @@ -65,6 +67,14 @@ snapshot-tests: cargo insta -h > /dev/null 2>&1 || cargo install cargo-insta cargo insta review +alias clean-orphaned-snapshots := snapshot-delete-unreferenced +# Delete any unreferenced snapshots +[group: 'test'] +@snapshot-delete-unreferenced: + #!/usr/bin/env bash + cargo insta -h > /dev/null 2>&1 || cargo install cargo-insta + cargo insta test --unreferenced=delete + # Build and run the binary for the current system run: @cargo run