Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/content/docs/docs/guides/testing/gas-snapshots.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ Function gas snapshots: 1 changed
To update snapshots, run your tests with --snapshot
```

The check only fails when existing values change. Adding or removing test functions or cheatcode snapshot calls won't cause a failure.
The check only fails when existing values change, or when no snapshots exist yet and there's nothing to compare against. Adding or removing test functions or cheatcode snapshot calls won't cause a failure.

:::note

`--snapshot-check` only reads your snapshot files. It never creates, updates, or deletes them. Use `--snapshot` to update your snapshots.

:::

## Function gas snapshots

Expand Down
Loading