tests/testthat/test_check_date.R

context("check_date")

# skip tests because they take too much time
skip_if(Sys.getenv("TEST_ONE") != "")
testthat::skip_on_cran()



# check_date -----------------------

test_that("check_date", {

  testthat::expect_invisible( check_date(date = 2020, all_dates = 202001:202012) )
  testthat::expect_invisible( check_date(date = 202001, all_dates = 202001:202012) )
  testthat::expect_error( check_date(date = 2030, all_dates = 202001:202012) )
  testthat::expect_error( check_date(date = 203099, all_dates = 202001:202012) )

  })

Try the flightsbr package in your browser

Any scripts or data that you put into this service are public.

flightsbr documentation built on June 8, 2025, 1:17 p.m.