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

Switch from ApprovalTests to VerifyTests for golden master testing #406

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

mscottford
Copy link
Member

@mscottford mscottford commented Nov 3, 2021

This replaces ApprovalTests, the library that's being used for golden master testing, with VerifyTests.

This switch is primarily motivated by challenges that have popped up because of how the ApprovalTests library formats the .received.txt that it generates. When the file that's generated by ApprovalTests contains multiple lines, for example when the contents of an array are being verified, then ApprovalTests uses the newline character \n to separate those lines, even when the test is running on a Windows OS while the typical line separator is \r\n.

A secondary benefit is that the output format used by VerifyTests is "based on" JSON. Which makes the files much easier to read the very large amount of data that is being verified by these tests. Hopefully, this will provide benefits when tracking down bugs that might result in a single value in the file being incorrect.

@mscottford
Copy link
Member Author

This might help address the current failure in PR #405 when the tests are being run on Windows.

This replaces, ApprovalTests, the library that's being used for golden
master testing with VerifyTests.

This switch is primarily motivated by challenges
that have popped up because of how the ApprovalTests library formats
the `.received.txt` that it generates. When the file that's generated by
ApprovalTests contains multiple lines, for example when the contents of
an array are being verified, then ApprovalTests uses the newline
character `\n` to separate those lines, even when the test is running on
a Windows OS while the typical line separator is `\r\n`.

A secondary benefit is that the output format used by VerifyTests is
"based on" JSON. Which makes the files much easier to read the very
large amount of data that is being verified by these tests. Hopefully,
this will provide benefits when tracking down bugs that might result in
a single value in the file being incorrect.
@mscottford mscottford merged commit 26239f3 into main Nov 3, 2021
@mscottford mscottford deleted the experiment-with-verify branch November 3, 2021 03:43
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2021
@mscottford mscottford added the dev-ops Updates to the CI, build, etc. label Nov 14, 2021
@mscottford mscottford added this to the v0.5.0 milestone Sep 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dev-ops Updates to the CI, build, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant