Consider switching to insta
for snapshot testing
#634
Labels
C-enhancement
Category: raise the bar on expectations
E-help-wanted
Call for participation: Help is requested to fix this issue.
E-mentor
Call for participation: Mentorship is available for this issue.
This project relies heavily on snapshot testing: we write test crates and lint them, then ensure that the outputs are both expected and haven't changed since the last run.
When
cargo-semver-checks
came into existence,insta
wasn't nearly as polished as it's become since. These days, it's feature-rich and fairly commonly used in the ecosystem.Our own hand-rolled snapshot testing can be a bit annoying to manage: one has to manually edit snapshot files, and observe proper item order since they are order-sensitive. However, it also allows us some conveniences: we can leave comments inside snapshot files (e.g. look at the removed lines in #631 for a useful snapshot comment), and we have tight control over how information is stored and where.
Can an
insta
-based workflow replicate the conveniences we care about, or offer other conveniences that make switching to it compelling?To close this issue, we need to:
insta
-based workflow would look likeinsta
cargo-insta
and how to useinsta
andcargo insta
productivelyThe text was updated successfully, but these errors were encountered: