Skip to content

Hand-rolling mini insta? #3835

Description

@matklad

So far, we've been using insta for snapshot testing, and it is super useful, but not perfect. Some of the paper cuts I see:

  • need to cargo install insta to fix snapshots
  • the insta tool someimes fails with obscure errors in the workspace
  • quite a few of dependencies
  • snapshot format is somewhat obscure with respect to leading whitespace
  • It's impossible to copy-paste the gold value from the test failure message

I am thinking that maybe less is more, and we should roll our own snapshot testing thing? I think getting rid of the coloring and using a simpler assert_eq_text style diff would be more convenient. The biggest problem is updating inline snapshots, but I think that shouldn't be too hard to implement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions