Running ‘testthat.R’ [24s/73s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(fingertipsR)
  > 
  > test_check("fingertipsR")
  ── 1. Error: nearest_neighbours returns as expected (@test-area_types.R#32)  ───
  lexical error: invalid char in json text.
                                         <!DOCTYPE html>  <html lang="en
                       (right here) ------^
  1: expect_is(nearest_neighbours(AreaCode = "E06000007", AreaTypeID = 101), "character") at testthat/test-area_types.R:32
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: nearest_neighbours(AreaCode = "E06000007", AreaTypeID = 101)
  5: paste0(path, sprintf("parent_to_child_areas?parent_area_type_id=%s", AreaTypeID)) %>% 
         get_fingertips_api() %>% names
  6: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: eval(quote(`_fseq`(`_lhs`)), env, env)
  9: `_fseq`(`_lhs`)
  10: freduce(value, `_function_list`)
  ...
  15: eval(quote(`_fseq`(`_lhs`)), env, env)
  16: eval(quote(`_fseq`(`_lhs`)), env, env)
  17: `_fseq`(`_lhs`)
  18: freduce(value, `_function_list`)
  19: withVisible(function_list[[k]](value))
  20: function_list[[k]](value)
  21: fromJSON(., flatten = TRUE)
  22: parse_and_simplify(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  23: parseJSON(txt, bigint_as_char)
  24: parse_string(txt, bigint_as_char)
  
  ── 2. Failure: the dimensions of deprivation decile function are as expected (@t
  dim(dep_7) not equal to c(6893, 3).
  1/2 mismatches
  [1] 7143 - 6893 == 250
  
  On 05/06/2019 Fingertips consisted of 40 profiles, made up of 3255 indicators and 1504 distinct indicators.── 3. Error: the indicator_order function works (@test-indicators.R#42)  ───────
  lexical error: invalid char in json text.
                                         <!DOCTYPE html>  <html lang="en
                       (right here) ------^
  1: expect_is(indicator_order(DomainID = 3007000, AreaTypeID = 102, ParentAreaTypeID = 6), 
         "data.frame") at testthat/test-indicators.R:42
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: indicator_order(DomainID = 3007000, AreaTypeID = 102, ParentAreaTypeID = 6)
  5: paste0(path, sprintf("parent_to_child_areas?parent_area_type_id=%s", ParentAreaTypeID)) %>% 
         GET(use_proxy(ie_get_proxy_for_url(.), username = "", password = "", auth = "ntlm")) %>% 
         content("text") %>% fromJSON %>% names
  6: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: eval(quote(`_fseq`(`_lhs`)), env, env)
  9: `_fseq`(`_lhs`)
  10: freduce(value, `_function_list`)
  11: function_list[[i]](value)
  12: fromJSON(.)
  13: parse_and_simplify(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  14: parseJSON(txt, bigint_as_char)
  15: parse_string(txt, bigint_as_char)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 60 SKIPPED: 0 WARNINGS: 1 FAILED: 3
  1. Error: nearest_neighbours returns as expected (@test-area_types.R#32) 
  2. Failure: the dimensions of deprivation decile function are as expected (@test-deprivation.R#15) 
  3. Error: the indicator_order function works (@test-indicators.R#42) 
  
  Error: testthat unit tests failed
  Execution halted