We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bfdb30 commit bbc1ec8Copy full SHA for bbc1ec8
tests/testthat/test-expect-self-test.R
@@ -27,3 +27,19 @@ test_that("show_failure", {
27
expect_null(show_failure(NULL))
28
expect_output(show_failure(expect_true(FALSE)), "FALSE is not TRUE")
29
})
30
+
31
+test_that("can test for presence and absense of failure", {
32
+ expect_success(expect_failure(fail()))
33
+ expect_success(expect_no_failure(succeed()))
34
35
+ expect_failure(expect_failure(succeed()))
36
+ expect_failure(expect_no_failure(fail()))
37
+})
38
39
+test_that("can test for presence and absense of success", {
40
+ expect_success(expect_success(succeed()))
41
+ expect_success(expect_no_success(fail()))
42
43
+ expect_failure(expect_success(fail()))
44
+ expect_failure(expect_no_success(succeed()))
45
0 commit comments