Skip to content

Commit 5af0683

Browse files
committed
Add test for skips
1 parent e004a08 commit 5af0683

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/testthat/test-describe.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,15 @@ test_that("has to have a valid description for the block", {
5151
it(c("a", "b"))
5252
})
5353
})
54+
55+
test_that("skips are scoped to describe/it", {
56+
reporter <- SilentReporter$new()
57+
with_reporter(reporter, {
58+
describe("", skip())
59+
describe("", expect_true())
60+
it("", skip())
61+
it("", expect_true(TRUE))
62+
})
63+
results <- reporter$expectations()
64+
expect_length(results, 4)
65+
})

0 commit comments

Comments
 (0)