Running ‘testthat.R’ [7s/25s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(viafr)
  > 
  > test_check("viafr")
  ── 1. Error: query list (@test_search.R#4)  ────────────────────────────────────
  Must extract column with a single valid subscript.
  ✖ The subscript `tibble_vars[[i]]` has value 0 but must be a positive location.
  Backtrace:
    1. testthat::expect_equal(...)
   26. purrr::map(split(x, 1:nrow(x)), get_text)
   27. viafr:::.f(.x[[i]], ...)
   28. viafr:::normalize(ungroup(result))
    5. purrr::set_names(x, utf8_normalize(colnames(x)))
   13. dplyr::mutate_if(., is.character, list(~utf8_normalize(.)))
   38. dplyr:::manip_if(...)
   39. dplyr:::tbl_if_syms(.tbl, .predicate, .env, .include_group_vars = .include_group_vars)
   43. dplyr:::tbl_if_vars(.tbl, .p, .env, ..., .include_group_vars = .include_group_vars)
   45. tibble:::`[[.tbl_df`(.tbl, tibble_vars[[i]])
   46. tibble:::tbl_subset2(x, j = i, j_arg = substitute(i))
   47. tibble:::vectbl_as_col_location2(...)
   54. vctrs::vec_as_location2(j, n, names, arg = as_label(j_arg))
   55. vctrs:::result_get(...)
  
  ── 2. Error: valid query (@test_search.R#33)  ──────────────────────────────────
  Must extract column with a single valid subscript.
  ✖ The subscript `tibble_vars[[i]]` has value 0 but must be a positive location.
  Backtrace:
    1. viafr::viaf_search("Duerer", maximumRecords = 5)
   22. purrr::map(split(x, 1:nrow(x)), get_text)
   23. viafr:::.f(.x[[i]], ...)
   24. viafr:::normalize(ungroup(result))
    5. purrr::set_names(x, utf8_normalize(colnames(x)))
   13. dplyr::mutate_if(., is.character, list(~utf8_normalize(.)))
   34. dplyr:::manip_if(...)
   35. dplyr:::tbl_if_syms(.tbl, .predicate, .env, .include_group_vars = .include_group_vars)
   39. dplyr:::tbl_if_vars(.tbl, .p, .env, ..., .include_group_vars = .include_group_vars)
   41. tibble:::`[[.tbl_df`(.tbl, tibble_vars[[i]])
   42. tibble:::tbl_subset2(x, j = i, j_arg = substitute(i))
   43. tibble:::vectbl_as_col_location2(...)
   50. vctrs::vec_as_location2(j, n, names, arg = as_label(j_arg))
   51. vctrs:::result_get(...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 36 | SKIPPED: 0 | WARNINGS: 31 | FAILED: 2 ]
  1. Error: query list (@test_search.R#4) 
  2. Error: valid query (@test_search.R#33) 
  
  Error: testthat unit tests failed
  Execution halted