tests/testthat/test-expect-vector.R

test_that("basic properties upheld", {
  skip_if_not_installed("vctrs", "0.1.0.9002")

  expect_success(expect_vector(1:10, size = 10))
  expect_failure(expect_vector(1:10, size = 5))
})

Try the testthat package in your browser

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

testthat documentation built on Jan. 21, 2022, 1:10 a.m.