Running ‘testthat.R’ [19s/19s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(tradestatistics)
  > 
  > test_check("tradestatistics")
  ── 1. Failure: ots_create_tidy_data connects to the API and returns an error aft
  `ots_create_tidy_data(years = 1962, reporters = "abc", partners = "cde")` threw an error with unexpected message.
  Expected match: "specified reporter returned no valid ISO code"
  Actual message: "result would be too long a vector"
  Backtrace:
   1. testthat::expect_error(...)
   6. tradestatistics::ots_create_tidy_data(...)
   7. years %in% min(year_range):max(year_range)
  
  ── 2. Failure: ots_create_tidy_data connects to the API and returns an error aft
  `ots_create_tidy_data(years = 1962, reporters = "chl", partners = "abc")` threw an error with unexpected message.
  Expected match: "specified partner returned no valid ISO code"
  Actual message: "result would be too long a vector"
  Backtrace:
   1. testthat::expect_error(...)
   6. tradestatistics::ots_create_tidy_data(...)
   7. years %in% min(year_range):max(year_range)
  
  ── 3. Failure: ots_create_tidy_data connects to the API and returns an error aft
  `ots_create_tidy_data(years = 1776, reporters = "usa", partners = "all")` threw an error with unexpected message.
  Expected match: "years exposed in api.tradestatistics.io/year_range."
  Actual message: "result would be too long a vector"
  Backtrace:
   1. testthat::expect_error(...)
   6. tradestatistics::ots_create_tidy_data(...)
   7. years %in% min(year_range):max(year_range)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 51 | SKIPPED: 0 | WARNINGS: 7 | FAILED: 3 ]
  1. Failure: ots_create_tidy_data connects to the API and returns an error after invalid input (@test-ots_create_tidy_data.R#52) 
  2. Failure: ots_create_tidy_data connects to the API and returns an error after invalid input (@test-ots_create_tidy_data.R#58) 
  3. Failure: ots_create_tidy_data connects to the API and returns an error after invalid input (@test-ots_create_tidy_data.R#64) 
  
  Error: testthat unit tests failed
  Execution halted