Skip to content

Include snapshot files in built package to satisfy testthat >= 3.3.0#40

Merged
nanxstats merged 1 commit into
mainfrom
testthat331
Feb 24, 2026
Merged

Include snapshot files in built package to satisfy testthat >= 3.3.0#40
nanxstats merged 1 commit into
mainfrom
testthat331

Conversation

@nanxstats
Copy link
Copy Markdown
Contributor

Similar to keaven/gsDesign#227

This PR removes the tests/testthat/_snaps$ rule from .Rbuildignore so the snapshot files will be included in the built package.

testthat 3.3.0 has made many changes on the snapshot testing behavior, which makes not detecting the snapshot files in the built package in CI environments a test fail instead of a pass:

Additionally, expect_snapshot() and friends will now fail when creating a new snapshot on CI, as that's usually a signal that you've forgotten to run the snapshot code locally before committing.

@nanxstats nanxstats merged commit 71c55a8 into main Feb 24, 2026
7 checks passed
@nanxstats nanxstats deleted the testthat331 branch February 24, 2026 05:34
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