Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tests/testthat/_snaps/describe.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 11 additions & 0 deletions tests/testthat/test-describe.R
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
Loading