Skip to content

Commit

Permalink
chore: Update snapshot testing README
Browse files Browse the repository at this point in the history
  • Loading branch information
Techassi committed Sep 30, 2024
1 parent a61a48d commit cf1ec21
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/stackable-versioned-macros/fixtures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ pub(crate) struct Foo {

First, add new input files (which automatically get picked up by `insta`) to the `fixtures/inputs`
folder. Make sure the delimiter is placed correctly between the attribute and the container
definition. Next, generate the snapshot files (initially not accepted) by running
definition. Doc comments on the container have to be placed after the delimiter. Next, generate the
snapshot files (initially not accepted) by running

```shell
cargo insta test -p stackable-versioned-macros
```

This command will place the new snapshot files in the `fixtures/snapshots` folder. To review them,
run the `cargo insta review` command, then accept or fix the snapshots. Once all are accepted (ie: no `.new` files remaining), check in the files.
This command will place the new snapshot files (with a `.new` extension) in the `fixtures/snapshots`
folder. These new snapshot files must not appear on `main`, but can be shared on branches for
collaboration. To review them, run the `cargo insta review` command, then accept or fix the
snapshots. Once all are accepted (ie: no `.new` files remaining), check in the files.

[rust-ref]: https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros
[insta-ext]: https://insta.rs/docs/vscode/
Expand Down

0 comments on commit cf1ec21

Please sign in to comment.