tests/testthat/test-function-excludeNULL.R

test_that("excludeNULL() works", {

  L <- list(a = 1, b = NULL, c = "three")

  expect_error(excludeNULL(0))
  expect_identical(sum(sapply(excludeNULL(L, dbg = FALSE), is.null)), 0L)
})
KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.