tests/testthat/test-unbind.R

df <- data.frame(x = c(NA, 1:4),
                 y = c(NA, NA, 1:3))

nab <- nabular(df)
nabu <- unbind_shadow(nab)

test_that("unbind_shadow returns tibble", {
  expect_s3_class(nabu, c("tbl_df"))
})

test_that("unbind_shadow returns right dimensions", {
  expect_equal(nrow(nabu), nrow(df))
  expect_equal(ncol(nabu), ncol(df))
})
njtierney/narnia documentation built on March 17, 2024, 1:06 p.m.