Skip to content

Commit dd57ce9

Browse files
committed
Deploying to gh-pages from @ eea12e6 πŸš€
1 parent cd5fdc0 commit dd57ce9

10 files changed

Lines changed: 21 additions & 15 deletions

File tree

β€Žarticles/mocking.htmlβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žarticles/mocking.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ function to mock.
291291
``` r
292292
unix_time <- function() unclass(Sys.time())
293293
unix_time()
294-
#> [1] 1767736878
294+
#> [1] 1767741509
295295
```
296296

297297
Now I’m going to create a function factory that makes it easy to compute
@@ -308,7 +308,7 @@ elapsed <- function() {
308308
timer <- elapsed()
309309
Sys.sleep(0.5)
310310
timer()
311-
#> [1] 0.5017884
311+
#> [1] 0.5018544
312312
```
313313

314314
Imagine trying to test this function without mocking! You’d probably

β€Žarticles/snapshotting.htmlβ€Ž

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žarticles/snapshotting.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ test_that("generates actionable error message", {
386386
#> safe_write_lines(letters, path)
387387
#> Condition
388388
#> Error in `safe_write_lines()`:
389-
#> ! '/tmp/Rtmp9mjXJk/file29606697dff7' already exists.
389+
#> ! '/tmp/RtmpYpnRQw/file293643d57760' already exists.
390390
#> i Set `overwrite = TRUE` to overwrite
391391
#> Test passed with 1 success 🎊.
392392
```
@@ -402,8 +402,8 @@ test_that("generates actionable error message", {
402402
#> safe_write_lines(letters, path)
403403
#> Condition
404404
#> Error in `safe_write_lines()`:
405-
#> - ! '/tmp/Rtmp9mjXJk/file29606697dff7' already exists.
406-
#> + ! '/tmp/Rtmp9mjXJk/file296044bb4098' already exists.
405+
#> - ! '/tmp/RtmpYpnRQw/file293643d57760' already exists.
406+
#> + ! '/tmp/RtmpYpnRQw/file2936e0f21ea' already exists.
407407
#> i Set `overwrite = TRUE` to overwrite
408408
#> * Run `testthat::snapshot_accept("snapshotting.Rmd")` to accept the change.
409409
#> * Run `testthat::snapshot_review("snapshotting.Rmd")` to review the change.

β€Žnews/index.htmlβ€Ž

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žnews/index.mdβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
CRAN release: 2025-11-25
66

7+
- [`expect_snapshot_file()`](https://testthat.r-lib.org/reference/expect_snapshot_file.md)
8+
correctly reports file name if duplicated
9+
([@MichaelChirico](https://github.com/MichaelChirico),
10+
[\#2296](https://github.com/r-lib/testthat/issues/2296)).
11+
712
- Fixed support for `shinytest2::AppDriver$expect_values()` screenshot
813
snapshot failing on CI
914
([\#2293](https://github.com/r-lib/testthat/issues/2293),

β€Žpkgdown.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ articles:
1111
special-files: special-files.html
1212
test-fixtures: test-fixtures.html
1313
third-edition: third-edition.html
14-
last_built: 2026-01-06T22:00Z
14+
last_built: 2026-01-06T23:17Z
1515
urls:
1616
reference: https://testthat.r-lib.org/reference
1717
article: https://testthat.r-lib.org/articles

β€Žreference/expect_snapshot_file.htmlβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žreference/expect_snapshot_file.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ save_png <- function(code, width = 400, height = 400) {
129129
}
130130
path <- save_png(plot(1:5))
131131
path
132-
#> [1] "/tmp/RtmpA8dFtx/file1bee4efeee5f.png"
132+
#> [1] "/tmp/RtmpK7psrQ/file1bdf6214b54c.png"
133133

134134
if (FALSE) { # \dontrun{
135135
expect_snapshot_file(save_png(hist(mtcars$mpg)), "plot.png")

β€Žsearch.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
Β (0)