Skip to content

Commit

Permalink
fix: update test doc for update snapshot
Browse files Browse the repository at this point in the history
fix #301
  • Loading branch information
HerringtonDarkholme committed Dec 11, 2023
1 parent 4da7933 commit 7ff7d39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/guide/test-rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Let's rerun `sg test` without `--skip-snapshot-tests` option.
This time we will get test failure that invalid code error does not have a matching snapshot.
Previously we use the `skip-snapshot-tests` option to suppress snapshot test, which is useful when you are still working on your rule. But after the rule is polished, we can create snapshot to capture the desired output of the rule.

The `--update-snapshots` or `-u` will generate a snapshot directory for us.
The `--update-all` or `-U` will generate a snapshot directory for us.

```bash
my-awesome-rules/
Expand Down Expand Up @@ -192,4 +192,4 @@ For Code:
Accept new snapshot? (Yes[y], No[n], Accept All[a], Quit[q])
```

Pressing the `y` key will accept the new snapshot and update the snapshot file.
Pressing the `y` key will accept the new snapshot and update the snapshot file.

0 comments on commit 7ff7d39

Please sign in to comment.