tests/testthat/test-load_data.R

library(dplyr)
library(testthat)

dataclean <- NOAAdata %>%
  eq_clean_data() %>%
  eq_location_clean()

test_that("Data loading and cleaning is ok", {
  expect_true(class(dataclean$Date) == "Date")
  expect_true(class(dataclean$Longitude) == "numeric")
  expect_true(class(dataclean$Latitude) == "numeric")
})
BFavetto/EarthquakeAnalysis documentation built on Dec. 17, 2021, 9:50 a.m.