tests/testthat/test_maha_check.R

context('test the maha_check function')

test_that(
  'maha_check runs without errors',
  {

    a <- dplyr::filter(GVA_by_sector_2016, sector == "all_dcms")
    b <- maha_check(a)
    a_split <- split(GVA_by_sector_2016,GVA_by_sector_2016$sector)

    expect_is(b,"data.frame")

    expect_equal(a,b)

    expect_is(lapply(a_split,maha_check),"list")

    }
  )
DCMSstats/eesectors documentation built on May 3, 2019, 2:43 p.m.