tests/testthat/test-TableProfiler-R6.R

context("unit test for TableProfiler Object")

test_that("Instantiating a TableProfiler on mtcars generates an accessible profile", {
    # No input arguments
    expect_error(TableProfiler$new())

    # Valid input argument
    expect_silent(TP <- TableProfiler$new(mtcars))
    expect_class(TP, "TableProfiler")
    expect_class(TP$profile, "data.frame")

    # Valid profile
    expect_attribute(TP$profile, "type")
})
tidylab/tableware documentation built on July 6, 2019, 1:12 a.m.