tests/testthat/test-makeStandardTable.R

test_that("function returns kable objects", {
  expect_true("kableExtra" %in% class(mst(tab = mtcars[1:10, ],
                                          type = "html")))
  expect_true("knitr_kable" %in% class(mst(tab = mtcars[1:10, ], lsd = TRUE)))
  expect_true("knitr_kable" %in% class(mst(tab = mtcars[1:10, ],
                                           type = "latex", lsd = FALSE)))
  expect_true("matrix" %in% class(prettyTab(as.matrix(mtcars[1:10, ]))))
  expect_true("matrix" %in% class(prettyTab(as.matrix(mtcars[1:10, ]),
                                            add_totals = TRUE)))
})
Rapporteket/NORIC documentation built on Sept. 7, 2024, 10:32 a.m.