Skip to content

Commit 227ea10

Browse files
committed
Update regex for data valdn error message in tests
1 parent d219a86 commit 227ea10

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/testthat/test-input_data_validation.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
test_that("All exported functions validate the incoming `data` object", {
22

3-
regexp_stop <- "`data` must be a `gt_tbl` object"
3+
# Stop messages can be either of:
4+
# - "`data` must be a `gt_tbl` object, not a tibble."
5+
# - "`data` must either be a `gt_tbl` or a `gt_group`, not a tibble."
6+
# The regex below handles both adequately
7+
regexp_stop <- "`data` must.*?be a `gt_tbl`"
48

59
# Test the `exibble` tibble with all exported functions;
610
# don't provide values for any arguments and ensure that

0 commit comments

Comments
 (0)