Skip to content

Conversation

@talf301
Copy link

@talf301 talf301 commented Dec 18, 2025

Currently when we use SnapshotTesting.jl we need to maintain a global variable indicating whether or not we're regenerating snapshots, and then manually set this variable back and forth when we make apparently breaking changes. This PR adopts some of the ergonomics from ReferenceTests.jl, getting rid of this global variable in each test suite and instead providing 2 options:

  • An environment variable JULIA_SNAPSHOTTESTS_UPDATE indicating whether or not we force updates (defaults to false)
  • When run in an interactive terminal, the test will behave in an interactive way. If the test fails, the user is shown the diff and asked if this is correct and they would like to update accordingly

We get rid of the regenerate flag from the API, so this is a breaking change and requires a major version bump.

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.

1 participant