You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Insta is a popular snapshot testing tool for Rust. I’m not too familiar with it, but it seems that this library could be integrated with it in two ways (they are not exclusive):
Version snapshots of the Migrations along with the code. We should already support this, thanks to the Debug serialisation implemented on this struct.
Just like we have a validate method for testing convenience, we could also have a method that outputs the final state of the database (or of the internal tables holding the schema?) after running all the migrations. That would be what insta would snapshot.
The use of all those features should be documented in the Readme.
This may be a good chance to introduce insta on our own tests.
It would go some way to achive the goals of #101, but in less complex and intrusive way:
it would be just a fuction, and
it would compose with the framework users already use for snapshot testing.
The text was updated successfully, but these errors were encountered:
Slightly adjusted the Debug representation to make it reproducible (the
value of function pointers obviously isn’t).
Regarding #112, this validates that Debug is enough to use insta, but
documenting this is left for a later PR.
Slightly adjusted the Debug representation to make it reproducible (the
value of function pointers obviously isn’t).
Regarding #112, this validates that Debug is enough to use insta, but
documenting this is left for a later PR.
Slightly adjusted the Debug representation to make it reproducible (the
value of function pointers obviously isn’t).
Regarding #112, this validates that Debug is enough to use insta, but
documenting this is left for a later PR.
Insta is a popular snapshot testing tool for Rust. I’m not too familiar with it, but it seems that this library could be integrated with it in two ways (they are not exclusive):
Migrations
along with the code. We should already support this, thanks to theDebug
serialisation implemented on this struct.validate
method for testing convenience, we could also have a method that outputs the final state of the database (or of the internal tables holding the schema?) after running all the migrations. That would be what insta would snapshot.It would go some way to achive the goals of #101, but in less complex and intrusive way:
The text was updated successfully, but these errors were encountered: