Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove --include-fuzz-tests from forge docs #499

Merged
merged 2 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/forge/gas-snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ or to compare gas usage before and after various optimizations.
To generate the gas snapshot, run [`forge snapshot`](../reference/forge/forge-snapshot.md).

This will generate a file called `.gas-snapshot` by default with all your
tests (not including fuzz tests) and their respective gas usage.
tests and their respective gas usage.

```ignore
$ forge snapshot
Expand Down
15 changes: 3 additions & 12 deletions src/reference/forge/forge-snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Create a snapshot of each test's gas usage.
The results are written to a file named `.gas-snapshot`. You can change the name of the file
by passing `--snap <PATH>`.

By default, fuzz tests are not included in the snapshot. To include them, pass `--include-fuzz-tests`.
Fuzz tests are included by default in the snapshot. They use a static seed to achieve deterministic results.

Snapshots can be compared with `--diff` and `--check`. The first flag will output a diff, and the second
will output a diff *and* exit with code 1 if the snapshots do not match.
Expand Down Expand Up @@ -51,10 +51,6 @@ Sort results by gas used (ascending).
`--snap` *path*
&nbsp;&nbsp;&nbsp;&nbsp;Output file for the snapshot. Default: `.gas-snapshot`.

`--include-fuzz-tests`
&nbsp;&nbsp;&nbsp;&nbsp;Include the mean and median gas use of fuzz tests in the snapshot.
&nbsp;&nbsp;&nbsp;&nbsp;Environment: `FORGE_INCLUDE_FUZZ_TESTS`

{{#include test-options.md}}

{{#include evm-options.md}}
Expand All @@ -74,17 +70,12 @@ Sort results by gas used (ascending).
forge snapshot
```

2. Create a snapshot with fuzz tests:
```sh
forge snapshot --include-fuzz-tests
```

3. Generate a diff:
2. Generate a diff:
```sh
forge snapshot --diff
```

4. Check that the snapshots match:
3. Check that the snapshots match:
```sh
forge snapshot --check
```
Expand Down