#cli #test #assert #command

dev bin+lib snapbox

Snapshot testing toolbox

20 releases

Uses new Rust 2021

0.4.4 Jan 4, 2023
0.4.3 Nov 26, 2022
0.4.0 Sep 23, 2022
0.3.3 Aug 15, 2022
0.2.9 Mar 9, 2022

#30 in Testing

Download history 7316/week @ 2022-10-07 5383/week @ 2022-10-14 7760/week @ 2022-10-21 9689/week @ 2022-10-28 8948/week @ 2022-11-04 8202/week @ 2022-11-11 7291/week @ 2022-11-18 9557/week @ 2022-11-25 7807/week @ 2022-12-02 7434/week @ 2022-12-09 8616/week @ 2022-12-16 6313/week @ 2022-12-23 8022/week @ 2022-12-30 8960/week @ 2023-01-06 8361/week @ 2023-01-13 9267/week @ 2023-01-20

35,827 downloads per month
Used in 53 crates (25 directly)

MIT/Apache

150KB
3.5K SLoC

snapbox

When you have to treat your tests like pets, instead of cattle

Documentation License Crates Status

snapbox is a snapshot-testing toolbox that is ready to use for verifying output from

  • Function return values
  • CLI stdout/stderr
  • Filesystem changes

It is also flexible enough to build your own test harness like trycmd.

See the docs for more.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0–7.5MB
~122K SLoC