tests/testthat/test_FARS.R

context("Test that the function maps states correctly")

library(dplyr)
library(maps)
library(FARS)

test_that("fars_map_state() maps correctly", {
     expect_silent(fars_map_state(24, 2013))           
     expect_silent(fars_map_state(9, 2014))           
     expect_error(fars_map_state(56, 2022))
     expect_error(fars_map_state(2346, 2015))
   })
AESpe/FARS documentation built on April 29, 2020, 12:24 a.m.