Skip to content

Commit

Permalink
Update README.md to reflect redesign of snapshot test runner
Browse files Browse the repository at this point in the history
It is no longer necessary to recompile to update snapshot test responses.
  • Loading branch information
weekday-grandine-io committed Jul 4, 2024
1 parent cffcdf7 commit 9a686e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ This is to keep the test runner simple.
This may change in the future.

`*.response` files do not have to be written by hand.
They can be generated and updated by setting `http_api::snapshot_tests::UPDATE_RESPONSES` to `true`.
They can be generated and updated by setting the `UPDATE_RESPONSES` environment variable to `true`:
```shell
UPDATE_RESPONSES=true cargo test
```
Setting it to any other value has the same effect as leaving it unset.

Self-contained requests without side effects should be grouped into test cases named `*read-only` to save resources.
The test runner treats them specially by always running all requests in them for better error reporting.
Expand Down

0 comments on commit 9a686e1

Please sign in to comment.