Skip to content

Feature request: inline snapshots #6

@matklad

Description

@matklad

Currently snapshots are stored in a separate files which is super-convenient for updating them, but makes reading the tests more difficult, because you don't have a test code and tests result near each other.

One could imagine a three argument form of assert_debug_snaphot_mathes, where the third argument is the text of the snapshot. It seems like this won't work, because updating the snapshot will require updating the source code, but perhaps it is possible? Snapshots have a well-defined header, so just grepping src for them should perhaps work? This sounds like a terrible idea, but I can see myself using it :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions