-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[test-infra][1/n] Replace Move's .exp
tests with cargo-insta
#21003
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this change so much! Left a comment where you can in fact have multiple assertions per-test and regenerate them all (even in the case of failure), so might be something worth adding to the doc comment.
/// For ease of use and reviewing, `insta_assert` should be used at most once per test. When it | ||
/// fails, it will stop the test. So if there are multiple snapshots in a given test, it would | ||
/// require multiple test runs to review all the failures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is necessarily true -- see "Disabling Assertion Failure" here: https://insta.rs/docs/advanced/#disabling-assertion-failure. Might be worth mentioning this/pointing to it in case folks do want to generate multiple snapshots per test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll mention it, but I think given the fact that you can only skip it via an env (and not something in Settings
) it is worth advising against. Just a lot of friction and what not
Description
insta::assert_snapshot
to ease migration from.exp
filesmove-docgen-testsuite
(which was already using snapshot)toml
filesTest plan
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.