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

    }
  )
ukgovdatascience/eesectors documentation built on Sept. 11, 2020, 12:19 p.m.