Skip to content

Integrate with Insta for testing #112

@cljoly

Description

@cljoly

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):

  1. Version snapshots of the Migrations along with the code. We should already support this, thanks to the Debug serialisation implemented on this struct.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions