diff --git a/tests/testthat/_snaps/describe.md b/tests/testthat/_snaps/describe.md index 18540e3e8..45a217506 100644 --- a/tests/testthat/_snaps/describe.md +++ b/tests/testthat/_snaps/describe.md @@ -1,3 +1,17 @@ +# snapshot tests in describe + + Code + 1 + 1 + Output + [1] 2 + +# snapshot tests in describe / and in it + + Code + 1 + 1 + Output + [1] 2 + # has to have a valid description for the block Code diff --git a/tests/testthat/test-describe.R b/tests/testthat/test-describe.R index beb8e9c71..fb5094b92 100644 --- a/tests/testthat/test-describe.R +++ b/tests/testthat/test-describe.R @@ -13,6 +13,17 @@ describe("describe", { }) }) +test_that("can write snaphot tests", { + local_description_set() + + describe("snapshot tests in describe", { + expect_snapshot(1 + 1) + it("and in it", { + expect_snapshot(1 + 1) + }) + }) +}) + test_that("unimplemented specs generate skips", { expectations <- capture_expectations({ it("can have not yet implemented specs", {