cargo-test-supports built-in assertions for jsonlines would perform the following transformation to the "expected" value
let expected_objs: Vec<_> = expected
.split("\n\n")
.map(|expect| {
expect
.parse()
.with_context(|| format!("failed to parse expected JSON object:\n{}", expect))
})
.collect::<Result<_>>()?;
so instead of
you'd get
This makes it easier to inspect the jsonlines data and to view the diffs.
For Cargo to adopt snapbox, we need something similar, see rust-lang/cargo#14039
cargo-test-supports built-in assertions for jsonlines would perform the following transformation to the "expected" valueso instead of
you'd get
This makes it easier to inspect the jsonlines data and to view the diffs.
For Cargo to adopt snapbox, we need something similar, see rust-lang/cargo#14039