Skip to content

Commit

Permalink
doc: mention cargo-insta in the Readme
Browse files Browse the repository at this point in the history
Call out:
* Use of the library with insta (insta.rs)
* Useful caro tools to install to debug failing CI
  • Loading branch information
cljoly committed Dec 10, 2023
1 parent 16ccfff commit 8bc8b52
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,20 @@ fn migrations_test() {
}
```

The migrations object is also suitable for serialisation with [insta][], using the `Debug` serialisation. You can store a snapshot of your migrations like this:

```rust
#[test]
fn migrations_insta_snapshot() {
let migrations = Migrations::new(vec![
// ...
]);
insta::assert_debug_snapshot!(migrations);
}
```

[insta]: https://insta.rs/

## Optional Features

Rusqlite_migration provides several [Cargo features][cargo_features]. They are:
Expand All @@ -128,6 +142,13 @@ A number of contributors are also reporting issues as they arise, another indica

Contributions (documentation or code improvements in particular) are welcome, see [contributing](https://cj.rs/docs/contribute/)!

We use various tools for testing that you may find helpful to install locally (e.g. to fix failing CI checks):
* [cargo-insta][]
* [cargo-mutants][]

[cargo-insta]: https://crates.io/crates/cargo-insta
[cargo-mutants]: https://mutants.rs/installation.html

## Acknowledgments

I would like to thank all the contributors, as well as the authors of the dependencies this crate uses.
Expand Down

0 comments on commit 8bc8b52

Please sign in to comment.