Skip to content

Snapshot tests #69

@killercup

Description

@killercup

Did we ever talk about snapshot tests? I don't recall, and I didn't find an issue in this or the assert_{cmd,cli} repos.

The idea is this: Instead of manually writing predicate::path::eq_file(Path::new("some.file")).utf8().unwrap();, you'd have a predicate::eq_snapshot!() macro that expands to a uniq filename predicate with the ability to create that file with the content it gets on the first test run or when using RECORD_SNAPSHOTS=1 or something similar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions