Skip to content

Commit 9fdf7d6

Browse files
committed
Clarify wording
Fixes #1774
1 parent fab6fdc commit 9fdf7d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vignettes/snapshotting.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ test_that("can snapshot a simple list", {
228228

229229
## Whole file snapshotting
230230

231-
`expect_snapshot()`, `expect_snapshot_output()`, `expect_snapshot_error()`, and `expect_snapshot_value()` all store their snapshots in a single file per test.
231+
`expect_snapshot()`, `expect_snapshot_output()`, `expect_snapshot_error()`, and `expect_snapshot_value()` use one snapshot file per test file.
232232
But that doesn't work for all file types --- for example, what happens if you want to snapshot an image?
233233
`expect_snapshot_file()` provides an alternative workflow that generates one snapshot per expectation, rather than one file per test.
234234
Assuming you're in `test-burger.R` then the snapshot created by `expect_snapshot_file(code_that_returns_path_to_file(), "toppings.png")` would be saved in `tests/testthat/_snaps/burger/toppings.png`.

0 commit comments

Comments
 (0)