Running ‘spelling.R’
  Running ‘testthat.R’ [55s/201s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(covidregionaldata)
  > source("testthat/custom_tests/mock_data.R")
  > 
  > test_check("covidregionaldata")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  ● On CRAN (46)
  
  ══ Warnings ════════════════════════════════════════════════════════════════════
  ── Warning (test-get_uk_regional_cases.R:55:3): get_uk_regional_cases returns data by date of release ──
  3298 parsing failures.
   row  col           expected   actual                                                                                                                                                                                                      file
  2028 age  1/0/T/F/TRUE/FALSE 0_to_5   'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
  2028 rate 1/0/T/F/TRUE/FALSE 17.3     'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
  2029 age  1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
  2029 rate 1/0/T/F/TRUE/FALSE 538.7    'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
  2030 age  1/0/T/F/TRUE/FALSE 6_to_17  'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-09-01'
  .... .... .................. ........ .........................................................................................................................................................................................................
  See problems(...) for more details.
  
  Backtrace:
    1. covidregionaldata:::get_uk_regional_cases_only_level_1(release_date = "2020-09-01") test-get_uk_regional_cases.R:55:2
    2. purrr::map(query_filters, get_uk_data, release_date = release_date)
    3. covidregionaldata:::.f(.x[[i]], ...)
    4. purrr::map(csv_links, ~safe_reader(.)[[1]])
    5. covidregionaldata:::.f(.x[[i]], ...)
    6. purrr:::safe_reader(.)
   15. covidregionaldata:::.f(...)
   16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
   17. readr:::read_delimited(...)
   18. readr:::warn_problems(out)
  ── Warning (test-get_uk_regional_cases.R:56:3): get_uk_regional_cases returns data by date of release ──
  5280 parsing failures.
   row  col           expected   actual                                                                                                                                                                                                      file
  2128 age  1/0/T/F/TRUE/FALSE 0_to_5   'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-10'
  2128 rate 1/0/T/F/TRUE/FALSE 30.9     'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-10'
  2129 age  1/0/T/F/TRUE/FALSE 65_to_84 'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-10'
  2129 rate 1/0/T/F/TRUE/FALSE 937      'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-10'
  2130 age  1/0/T/F/TRUE/FALSE 6_to_17  'https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumAdmissionsByAge&metric=covidOccupiedMVBeds&metric=hospitalCases&metric=plannedCapacityByPublishDate&format=csv&release=2020-12-10'
  .... .... .................. ........ .........................................................................................................................................................................................................
  See problems(...) for more details.
  
  Backtrace:
    1. covidregionaldata:::get_uk_regional_cases_only_level_1(...) test-get_uk_regional_cases.R:56:2
    2. purrr::map(query_filters, get_uk_data, release_date = release_date)
    3. covidregionaldata:::.f(.x[[i]], ...)
    4. purrr::map(csv_links, ~safe_reader(.)[[1]])
    5. covidregionaldata:::.f(.x[[i]], ...)
    6. purrr:::safe_reader(.)
   15. covidregionaldata:::.f(...)
   16. readr:::read_csv_fun(file, col_types = readr::cols(), ...)
   17. readr:::read_delimited(...)
   18. readr:::warn_problems(out)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-get_uk_regional_cases.R:56:3): get_uk_regional_cases returns data by date of release ──
  Error: `.x` is empty, and no `.init` supplied
  Backtrace:
      █
   1. └─covidregionaldata:::get_uk_regional_cases_only_level_1(...) test-get_uk_regional_cases.R:56:2
   2.   └─purrr::map(query_filters, get_uk_data, release_date = release_date)
   3.     └─covidregionaldata:::.f(.x[[i]], ...)
   4.       └─purrr::reduce(...)
   5.         └─purrr:::reduce_impl(.x, .f, ..., .init = .init, .dir = .dir)
   6.           └─purrr:::reduce_init(.x, .init, left = left)
  
  [ FAIL 1 | WARN 2 | SKIP 46 | PASS 22 ]
  Error: Test failures
  Execution halted