-
-
Notifications
You must be signed in to change notification settings - Fork 147
Closed
Description
Description
I am using insta for some snapshot testing for a code formatter.
For some tests, I run cargo insta test --review, and accept the new snapshot for the new test.
I then run cargo insta test --review again, and insta picks up on some sort of difference (there shouldn't be any difference), but in the review stage, it says the snapshots are matching (as expected):
Reviewing [1/1]:
Package: stylua (0.4.1)
Snapshot file: tests\snapshots\tests__standard@ignore-comment.lua.snap
Snapshot: standard@ignore-comment
Source: C:\Users\Development\Documents\luafmt
-old snapshot
+new results
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
format(&contents)
────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
- │ snapshots are matching
────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
a accept keep the new snapshot
r reject keep the old snapshot
s skip keep both for now
This causes the test to fail, even though the snapshots are exactly the same.
Sample input file (loaded in through using insta::glob())
-- stylua: ignore
local bar = baz
Output when running the test is equal to the above input file
Corresponding snap file
---
source: tests/tests.rs
expression: format(&contents)
---
-- stylua: ignore
local bar = baz
Additional helpful information:
- Version of insta: 1.6.3
- Version of rustc: 1.48.0 (7eac88abb 2020-11-16)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels