@@ -70,10 +70,7 @@ test_that("basic workflow", {
7070
7171 # warns on first run
7272 snapper $ start_file(" snapshot-6" , " test" )
73- expect_warning(
74- expect_snapshot_file(write_tmp_lines(letters ), " letters.txt" ),
75- " Adding new"
76- )
73+ expect_warning(expect_snapshot_file(write_tmp_lines(letters ), " letters.txt" ), " Adding new" )
7774 snapper $ end_file()
7875
7976 # succeeds if unchanged
@@ -83,10 +80,7 @@ test_that("basic workflow", {
8380
8481 # fails if changed
8582 snapper $ start_file(" snapshot-6" , " test" )
86- expect_failure(expect_snapshot_file(
87- write_tmp_lines(letters [- 1 ]),
88- " letters.txt"
89- ))
83+ expect_failure(expect_snapshot_file(write_tmp_lines(letters [- 1 ]), " letters.txt" ))
9084 snapper $ end_file()
9185})
9286
@@ -118,12 +112,7 @@ test_that("warns on first creation", {
118112
119113 # Errors on non-existing file
120114 expect_error(
121- expect_true(snapshot_file_equal(
122- tempdir(),
123- " test.txt" ,
124- NULL ,
125- " doesnt-exist.txt"
126- )),
115+ expect_true(snapshot_file_equal(tempdir(), " test.txt" , NULL , " doesnt-exist.txt" )),
127116 " `doesnt-exist.txt` not found"
128117 )
129118
@@ -178,22 +167,7 @@ test_that("snapshot_hint output differs in R CMD check", {
178167 testthat ::: snapshot_review_hint(... , reset_output = FALSE )
179168 }
180169
181- expect_snapshot(cat(snapshot_review_hint(
182- " lala" ,
183- " foo.r" ,
184- check = FALSE ,
185- ci = FALSE
186- )))
187- expect_snapshot(cat(snapshot_review_hint(
188- " lala" ,
189- " foo.r" ,
190- check = TRUE ,
191- ci = FALSE
192- )))
193- expect_snapshot(cat(snapshot_review_hint(
194- " lala" ,
195- " foo.r" ,
196- check = TRUE ,
197- ci = TRUE
198- )))
170+ expect_snapshot(cat(snapshot_review_hint(" lala" , " foo.r" , check = FALSE , ci = FALSE )))
171+ expect_snapshot(cat(snapshot_review_hint(" lala" , " foo.r" , check = TRUE , ci = FALSE )))
172+ expect_snapshot(cat(snapshot_review_hint(" lala" , " foo.r" , check = TRUE , ci = TRUE )))
199173})
0 commit comments