tests/testthat/test-function-removeAttributes.R

test_that("removeAttributes() works", {

  x <- structure(1, a = 1, b = 2)  
  
  expect_null(attributes(removeAttributes(x)))
  expect_identical(attributes(removeAttributes(x, "a")), list(b = 2))
})
KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.