tests/testthat/testthat.R

library(testthat)
library(fars)

test_that("erroneous file name", {
  expect_that(fars_read("accident_2012.csv.bz2"), throws_error())
})


test_that("throwing error", {
  expect_that(fars_map_state(2, 2013), throws_error())
})
AnoushiravanR/fars documentation built on Jan. 19, 2021, 5:16 p.m.