Skip to content

Commit 5925478

Browse files
authored
Simplify snaphot test (#2202)
I'm not sure why it was necessary to test the hyperlinks but I am confident that I and many others will immediately notice if these stop working.
1 parent 03ee414 commit 5925478

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

tests/testthat/_snaps/snapshot.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,13 @@
258258
Code
259259
cat(snapshot_accept_hint("_default", "bar.R", reset_output = FALSE))
260260
Output
261-
* Run ]8;;ide:run:testthat::snapshot_accept('bar.R')testthat::snapshot_accept('bar.R')]8;; to accept the change.
262-
* Run ]8;;ide:run:testthat::snapshot_review('bar.R')testthat::snapshot_review('bar.R')]8;; to interactively review the change.
261+
* Run `testthat::snapshot_accept('bar.R')` to accept the change.
262+
* Run `testthat::snapshot_review('bar.R')` to interactively review the change.
263263
Code
264264
cat(snapshot_accept_hint("foo", "bar.R", reset_output = FALSE))
265265
Output
266-
* Run ]8;;ide:run:testthat::snapshot_accept('foo/bar.R')testthat::snapshot_accept('foo/bar.R')]8;; to accept the change.
267-
* Run ]8;;ide:run:testthat::snapshot_review('foo/bar.R')testthat::snapshot_review('foo/bar.R')]8;; to interactively review the change.
266+
* Run `testthat::snapshot_accept('foo/bar.R')` to accept the change.
267+
* Run `testthat::snapshot_review('foo/bar.R')` to interactively review the change.
268268

269269
# expect_snapshot validates its inputs
270270

tests/testthat/test-snapshot.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,6 @@ test_that("errors and warnings are folded", {
166166
# })
167167

168168
test_that("hint is informative", {
169-
local_reproducible_output(crayon = TRUE, hyperlinks = TRUE, rstudio = TRUE)
170-
171169
expect_snapshot({
172170
cat(snapshot_accept_hint("_default", "bar.R", reset_output = FALSE))
173171
cat(snapshot_accept_hint("foo", "bar.R", reset_output = FALSE))

0 commit comments

Comments
 (0)