Skip to content

Commit 65314c2

Browse files
committed
Add another test.
1 parent 5f36bbe commit 65314c2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/testthat/_snaps/snapshot-manage.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@
4646
Updating snapshots:
4747
* a.md
4848

49+
---
50+
51+
Code
52+
snapshot_accept("b.txt", path = path)
53+
Message
54+
Updating snapshots:
55+
* b.txt
56+
4957
---
5058

5159
Code

tests/testthat/test-snapshot-manage.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ test_that("can accept specific files", {
2626
expect_snapshot(snapshot_accept("a", path = path))
2727
expect_equal(dir(file.path(path, "_snaps")), c("a.md", "b.new.txt", "b.txt"))
2828

29+
path <- local_snapshot_dir(c("a.md", "a.new.md", "b.txt", "b.new.txt"))
30+
expect_snapshot(snapshot_accept("b.txt", path = path))
31+
expect_equal(dir(file.path(path, "_snaps")), c("a.md", "a.new.md", "b.txt"))
32+
2933
path <- local_snapshot_dir(c("test/a.md", "test/a.new.md",
3034
"test/b.txt", "test/b.new.txt"))
3135
expect_snapshot(snapshot_accept("test/", path = path))

0 commit comments

Comments
 (0)