`assert_is_subset()` doesn't error on `NULL`

Create issue
Issue #27 new
Former user created an issue

Hi Richie,

I came across some potentially unwanted behavior with assert_is_subset(). If you attempt to pass NULL or an empty character here, the validity check returns true without error. For example:

# These return clean, unexpectedly.
assert_is_subset(NULL, "XXX")
assert_is_subset(c(), "XXX")

# These error, as expected.
assert_is_subset("nope", "XXX")
assert_is_subset(TRUE, "XXX")
assert_is_subset(1, "XXX")

Can we tighten this assert check to look for empty values?

Best, Mike

Comments (1)

  1. Log in to comment