Running 'testthat.R' [49s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(bomrang)
  > 
  > test_check("bomrang")
  -- 1. Error: Data table if requested (@test-get_current_weather.R#61)  ---------
  
  A station was matched.  However, a corresponding JSON file was not found at bom.gov.au.
  1: get_current_weather("Melbourne Airport", as.data.table = TRUE) at testthat/test-get_current_weather.R:61
  2: tryCatch({
         observations.json <- jsonlite::fromJSON(txt = json_url)
     }, error = function(e) {
         e$message <- paste("\nA station was matched. ", "However, a corresponding JSON file was not found at", 
             "bom.gov.au.\n")
         e$call <- NULL
         stop(e)
     })
  3: tryCatchList(expr, classes, parentenv, handlers)
  4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5: value[[3L]](cond)
  
  -- 2. Failure: Error handling (@test-get_historical.R#8)  ----------------------
  `get_historical("2")` threw an error with unexpected message.
  Expected match: "Station not recognised."
  Actual message: "Timeout was reached: Connection timed out after 10015 milliseconds"
  
  -- 3. Error: Error handling (@test-get_historical.R#11)  -----------------------
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: expect_warning(get_historical(stationid = "023000", latlon = c(1, 2)), regexp = "Only one.*stationid.*latlon") at testthat/test-get_historical.R:11
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: get_historical(stationid = "023000", latlon = c(1, 2))
  7: .get_ncc()
  8: readr::read_table(weather[i], skip = 4, col_names = c("site", "name", "lat", "lon", 
         "start_month", "start_year", "end_month", "end_year", "years", "percent", "AWS"), 
         col_types = c(site = readr::col_integer(), name = readr::col_character(), lat = readr::col_double(), 
             lon = readr::col_double(), start_month = readr::col_character(), start_year = readr::col_character(), 
             end_month = readr::col_character(), end_year = readr::col_character(), years = readr::col_double(), 
             percent = readr::col_integer(), AWS = readr::col_character()), na = "")
  9: datasource(file, skip = skip)
  10: datasource_connection(file, skip, comment)
  11: datasource_raw(read_connection(path), skip, comment = comment)
  12: new_datasource("raw", text, skip = skip, comment = comment)
  13: structure(list(x, skip = skip, comment = comment, ...), class = c(paste0("source_", 
         type), "source"))
  14: read_connection(path)
  15: open(con, "rb")
  16: open.connection(con, "rb")
  
  == testthat results  ===========================================================
  OK: 28 SKIPPED: 48 FAILED: 3
  1. Error: Data table if requested (@test-get_current_weather.R#61) 
  2. Failure: Error handling (@test-get_historical.R#8) 
  3. Error: Error handling (@test-get_historical.R#11) 
  
  Error: testthat unit tests failed
  Execution halted