tests/testthat/test_eq_clean.R

context('one function load data')


dat<-NOAA_quakes

test_that('eq_load_clean_data loads data correctly', {
  
  res <- eq_clean_data(dat)
  
  expect_is(res$LATITUDE, 'numeric')
  expect_is(res$LONGITUDE, 'numeric')
  
  clean_NOAA <- NOAA_quakes %>%
    eq_clean_data() %>%
    eq_location_clean()
  

  expect_equal(res,clean_NOAA)

})
jyjek/jyjekNOAA documentation built on May 7, 2019, 10:52 p.m.