tests/testthat/test_vacuum_cleaner.R

test_that('vacuum_cleaner validates input arguments', {

  expect_warning(vacuum_cleaner(matrix(c('a', 1:3), nrow = 2)), 'argument "x" must be convertable to a numeric matrix')
  expect_warning(vacuum_cleaner(matrix(1:6, nrow = 2)), 'argument "x" must have at least 3 rows and columns')
})

Try the vacuum package in your browser

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

vacuum documentation built on Sept. 8, 2020, 9:07 a.m.