#cli #test #assert #command

dev bin+lib snapbox

Snapshot testing toolbox

41 releases

new 0.5.7 Feb 27, 2024
0.4.17 Feb 8, 2024
0.4.15 Dec 8, 2023
0.4.14 Oct 2, 2023
0.2.9 Mar 9, 2022

#101 in Testing

Download history 14520/week @ 2023-11-06 15748/week @ 2023-11-13 12474/week @ 2023-11-20 17009/week @ 2023-11-27 15955/week @ 2023-12-04 15287/week @ 2023-12-11 13249/week @ 2023-12-18 11415/week @ 2023-12-25 15436/week @ 2024-01-01 16929/week @ 2024-01-08 17666/week @ 2024-01-15 15180/week @ 2024-01-22 16565/week @ 2024-01-29 17819/week @ 2024-02-05 16162/week @ 2024-02-12 17526/week @ 2024-02-19

69,411 downloads per month
Used in 122 crates (55 directly)

MIT/Apache

200KB
4.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–13MB
~146K SLoC