mitsuhiko / insta

A snapshot testing library for rust
https://insta.rs
Apache License 2.0
2.15k stars 98 forks source link

feat: add `assert_compact_debug_snapshot` #514

Closed jrandolf closed 2 months ago

jrandolf commented 3 months ago

The pretty-print format of debug is generally extremely verbose. It's great for complex objects, but for simple ones, the compact form of debug is far more suitable. This PR adds a assert_compact_debug_snapshot similar to assert_compact_json_snapshot.

max-sixty commented 2 months ago

@jun-sheaf while we wait for a review — could we merge master and ensure the tests pass?

jrandolf commented 2 months ago

@max-sixty That error is not related to this PR. Nevertheless, I've added the fix.

max-sixty commented 2 months ago

@max-sixty That error is not related to this PR.

The fix is on master so if you merge master it'll resolve...

And the docs break does seem to be from this PR...

max-sixty commented 2 months ago

Merged — thanks @jun-sheaf . If you want to also add an entry to the Changelog in a PR then great. Otherwise someone can do it when releasing.

tisonkun commented 1 month ago

Merged — thanks @jun-sheaf . If you want to also add an entry to the Changelog in a PR then great. Otherwise someone can do it when releasing.

See https://github.com/mitsuhiko/insta/pull/552

I'd like to try to this new feature when a new version (1.40.0) out.