-
-
Notifications
You must be signed in to change notification settings - Fork 127
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
When adding a trailing comma in an inline snapshot @"",
, the diff is correctly shown when the test fails, but `cargo insta review reports that there are no more snaphots to review.
Reproduction steps
- Add an inline snapshot test with a trailing comma
@"",
.
fn foo(x: i8) -> i8 { x }
#[test]
fn it_does_not_work() {
insta::assert_snapshot!(foo(8), @"",);
}
#[test]
fn it_works() {
insta::assert_snapshot!(foo(8), @"8");
}
- Run
cargo test
. Diff is correctly shown. - Run
cargo insta review
. Insta reports:done: no snapshots to review
Insta Version
insta = "1.43.1"
rustc Version
rustc 1.86.0
What did you expect?
Either an error message that trailing commas are not allowed in that context, or to be able to review the snapshot of the failed test.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working