assert-rs / snapbox

Snapshot testing for a herd of CLI tests
docs.rs/trycmd
Apache License 2.0
130 stars 17 forks source link

Structured data (like json, toml, yaml) asserts in trycmd #93

Open epage opened 2 years ago

epage commented 2 years ago

Building on #92, it'd be great to have structured data handling in trycmd to allow irrelevant details to be glossed over and for smarter wildcards.

epage commented 2 years ago

We could have feature flags per format.

We probably also want to allow tests to enable which formats should be handled. This would be the structured-data version of text-vs-binary.

epage commented 2 years ago

We need to allow ways to opt-out of "ignoring the irrelevant details" because things like formatting can be important for people to test.

Most likely, someone will only need a fraction of their structured-data tests to focus on formatting vs the rest focusing on various cases for the content of the data.

See also discussions in #91, #95

CC @MiSawa