tests/testthat/test-write_to_coins.R

test_that("write to log", {

  # write to log must be called through another COINr function
  # new_coin
  coin <- new_coin(ASEM_iData, ASEM_iMeta)
  expect_s3_class(coin, "coin")
  expect_equal(names(coin$Log), c("new_coin", "can_regen"))

  # check with :: syntax
  coin <- COINr::new_coin(ASEM_iData, ASEM_iMeta)
  expect_s3_class(coin, "coin")
  expect_equal(names(coin$Log), c("new_coin", "can_regen"))

  # add another function
  coin <- qNormalise(coin, dset = "Raw")
  expect_setequal(names(coin$Log), c("new_coin", "can_regen", "qNormalise"))

})

Try the COINr package in your browser

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

COINr documentation built on Oct. 9, 2023, 5:07 p.m.