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

Document environment variables in README #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

## Arbitrary

GoldenSpecs functions write golden files if they do not exist. When they do
exist they use a seed from the golden file to create an arbitrary value of a
GoldenSpecs functions write golden files if they do not exist and the
CREATE_MISSING_GOLDEN environment is set, otherwise the test will fail to ensure
that there is really a golden file commited int the repository and the file is not
created on every run.
When they do exist they use a seed from the golden file to create an arbitrary value of a
type and check if the serialization matches the file. If it fails it means
that there has been a change in the Aeson serialization or a change in the
data type.
data type. When a breaking change in serialization is made, one can set the
RECREATE_BROKEN_GOLDEN environment variable when running the tests while developing
(ie: do no set this env var unconditionally on CI) to recreate the golden files that have
been affected.

RoundtripSpecs make sure that a type is able to be encoded to JSON, decoded
from JSON back to the original type, and equal the same value. If it fails
Expand Down