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

Add SnapshotTest #2233

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

oyvindberg
Copy link
Contributor

@oyvindberg oyvindberg commented May 14, 2024

This reads CI environment variable (same as sbt) to determine if we're running in CI.

This variable determines which behaviour the tests have

  • If we're running in CI it checks that the contents of all the snapshot files are up to date
  • Otherwise, it'll update the files with new contents.

The point is that a given change will showcase the effective results right in the PR, and otherwise be convenient to work with

Extracted from #2216

This reads `CI` environment variable (same as sbt) to determine if we're running in CI.

This variable determines which behaviour the tests have
- If we're running in CI it checks that the contents of all the snapshot files are up to date
- Otherwise, it'll update the files with new contents.

The point is that a given change will showcase the effective results right in the PR, and otherwise be convenient to work with
@oyvindberg
Copy link
Contributor Author

a cool thing here for later would be to verify that the code compiles as well

@ghostdogpr
Copy link
Owner

a cool thing here for later would be to verify that the code compiles as well

There is the typeCheck assertion in ZIO Test.

@ghostdogpr ghostdogpr merged commit b6bfd2c into ghostdogpr:series/2.x May 15, 2024
10 checks passed
@ghostdogpr
Copy link
Owner

There is the typeCheck assertion in ZIO Test.

Ah never mind, I think it's for strings known at compile time only.

@oyvindberg oyvindberg deleted the add-snapshot-tests branch May 15, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants