-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Using insta for schema generation and updates #475
Comments
I think this falls under the second item in #353 (comment) — i.e. a plain file with no metadata which is compared to the generated text |
Would you want to "move" the entire snapshot or just also store it elsewhere in addition? |
I'd move it to avoid duplicating the git diff |
@konstin I have been thinking about this a bit. Does what I write in that comment make sense? #456 (comment) |
I do like the flat macro we have now, but honestly happy about whatever lets me configure the filename while showing diffs in |
I think #610 can do a lot of this, because it can print plain snapshots with the extension we want. It In particular @xamgore — I thought your comment was insightful and clearly you've put a lot of thought into this. Would be interested in your feedback / whether #610 can fill most of those gaps. |
Hey, thanks for calling out 😌 I'll review the code this Sunday and come back with the feedback. |
In our projects, we're generating json schema output for our configuration. We want to check that this json is up-to-date when running tests, with an additional option to update it when it isn't - basically what
assert_json_snapshot
does with nicer UX. The only difference is that we need the output file to be put somewhere else, we call it{project}.schema.js
and it lives in the project root with no header. Is supporting this kind of output in scope for insta?The text was updated successfully, but these errors were encountered: