tests/testthat/test-helper-fake_lbk.R

test_that("fake_lbk w/ lenght-2 input outpus 2 rows", {
  expect_equal(nrow(fake_lbk(c("a", "a"))), 2L)
})

test_that("fake_abcd w/ lenght-2 input outpus 2 rows", {
  expect_equal(nrow(fake_abcd(c("a", "a"))), 2L)
})

test_that("fake_matched w/ lenght-2 input outpus 2 rows", {
  expect_equal(nrow(fake_matched(c("a", "a"))), 2L)
})

test_that("fake_lbk creates new columns", {
  expect_named(
    fake_lbk(new1 = 1, new2 = 1),
    c(names(fake_lbk()), "new1", "new2")
  )
})

Try the r2dii.match package in your browser

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

r2dii.match documentation built on June 22, 2024, 9:38 a.m.