Skip to content

Commit 8566f94

Browse files
authored
Drop nulll helper (#2139)
1 parent 41bb354 commit 8566f94

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

R/utils.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#' @export
33
magrittr::`%>%`
44

5-
null <- function(...) invisible()
6-
75
escape_regex <- function(x) {
86
chars <- c(
97
"*",

tests/testthat/_snaps/expect-condition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# regexp = NULL checks for presence of error
22

3-
`null()` did not throw the expected error.
3+
`{ ... }` did not throw the expected error.
44

55
# regexp = string matches for error message
66

tests/testthat/test-expect-condition.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ test_that("returns condition or value", {
55

66
test_that("regexp = NULL checks for presence of error", {
77
expect_success(expect_error(stop()))
8-
expect_snapshot_failure(expect_error(null()))
8+
expect_snapshot_failure(expect_error({}))
99
})
1010

1111
test_that("regexp = NA checks for absence of error", {
12-
expect_success(expect_error(null(), NA))
12+
expect_success(expect_error({}, NA))
1313
expect_failure(expect_error(stop("Yes"), NA))
1414
})
1515

@@ -136,7 +136,7 @@ test_that("when checking for no warnings, exclude deprecation warnings (2e)", {
136136
# expect_message ----------------------------------------------------------
137137

138138
test_that("regexp = NA checks for absence of message", {
139-
expect_success(expect_message(null(), NA))
139+
expect_success(expect_message({}, NA))
140140
expect_failure(expect_message(message("!"), NA))
141141
})
142142

0 commit comments

Comments
 (0)