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")
  )
})

test_that("fake_lbk outputs expected value", {
  expect_snapshot_value(fake_lbk(), style = "json2")
})
2DegreesInvesting/r2dii.match documentation built on Sept. 12, 2022, 11:15 p.m.