tests/testthat/test_inspect_block.R

test_that("inspect_block provides proper messages and warnings", {

  expect_that(inspect_block(data = letters, 30), throws_error())
  expect_that(inspect_block(security_logs, "30"), throws_error())

})

test_that("inspect_block provides proper output", {

  expect_true(is.list(inspect_block(security_logs, 30)))
  expect_equal(inspect_block(security_logs, 30) %>% length(), 10)

})

Try the anomalyDetection package in your browser

Any scripts or data that you put into this service are public.

anomalyDetection documentation built on March 18, 2018, 1:21 p.m.