-
Notifications
You must be signed in to change notification settings - Fork 342
Open
Description
#2149 added new feature:
expect_snapshot()and friends will now fail when creating a new snapshot on CI. This is usually a signal that you've forgotten to run it locally before committing (Should initial snapshot error on CI?Β #1461).
This is problematic for packages with many snapshots.
Situation:
- Package has many visual snapshot tests
- Many snaps cause package to be larger than 5mb
- These snaps a never used within revdep checks
Previous solution:
- R build Ignore the
tests/testthat/_snapsfolder. Nothing is sent to CRAN and nothing is tested on CI. Local testing performs full snapshot testing.
Proposal:
- The default value of
fail_on_newshould be determined by the existence of the_snapsfolder:fail_on_new = fs::dir_exists(here::here("tests/testthat/_snaps"))- Behavior:
- If no snaps exist during testing, do not fail on new snaps (new behavior)
- else fail then any new snap should cause a CI failure (current behavior)
- Behavior:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels