Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [15s/40s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(GitStats)
  > 
  > test_check("GitStats")
  
  .........
  [ FAIL 1 | WARN 0 | SKIP 115 | PASS 772 ]
  
  ══ Skipped tests (115) ═════════════════════════════════════════════════════════
  • On CRAN (105): 'test-00-api-requests.R:2:3', 'test-00-api-requests.R:30:3',
    'test-00-api-requests.R:97:3', 'test-00-api-requests.R:125:3',
    'test-00-get_orgs-GitHub.R:6:3', 'test-00-get_orgs-GitHub.R:14:3',
    'test-00-get_orgs-GitHub.R:52:3', 'test-00-get_orgs-GitHub.R:90:3',
    'test-00-get_orgs-GitLab.R:4:3', 'test-00-get_orgs-GitLab.R:12:3',
    'test-00-get_orgs-GitLab.R:40:3', 'test-00-get_orgs-GitLab.R:80:3',
    'test-00-get_orgs-GitLab.R:114:3', 'test-00-get_orgs-GitLab.R:163:3',
    'test-00-get_orgs-GitLab.R:224:3', 'test-00-get_orgs-GitLab.R:244:3',
    'test-00-get_orgs-GitLab.R:277:3', 'test-00-get_orgs-GitLab.R:308:3',
    'test-00-get_orgs-GitLab.R:347:3', 'test-00-get_orgs-GitLab.R:447:3',
    'test-00-get_orgs-GitLab.R:456:3', 'test-00-get_orgs-GitStats.R:61:3',
    'test-01-get_repos-GitHub.R:4:3', 'test-01-get_repos-GitHub.R:13:3',
    'test-01-get_repos-GitHub.R:22:3', 'test-01-get_repos-GitHub.R:293:3',
    'test-01-get_repos-GitHub.R:317:3', 'test-01-get_repos-GitHub.R:344:3',
    'test-01-get_repos-GitHub.R:475:3', 'test-01-get_repos-GitHub.R:596:3',
    'test-01-get_repos-GitLab.R:4:3', 'test-01-get_repos-GitLab.R:13:3',
    'test-01-get_repos-GitLab.R:151:3', 'test-01-get_repos-GitLab.R:283:3',
    'test-01-get_repos-GitLab.R:305:3', 'test-01-get_repos-GitLab.R:323:3',
    'test-01-get_repos-GitLab.R:352:3', 'test-01-get_repos-GitLab.R:420:3',
    'test-01-get_repos-GitLab.R:447:3', 'test-01-get_repos-GitStats.R:147:3',
    'test-01-get_repos-GitStats.R:178:3', 'test-02-get_commits-GitHub.R:4:3',
    'test-02-get_commits-GitHub.R:52:3', 'test-02-get_commits-GitLab.R:147:3',
    'test-02-get_commits-GitLab.R:180:3', 'test-02-get_commits-GitStats.R:65:3',
    'test-02-get_commits-GitStats.R:101:3',
    'test-02-get_commits-GitStats.R:115:3',
    'test-03-get_files_structure-GitHub.R:4:3',
    'test-03-get_files_structure-GitHub.R:235:3',
    'test-03-get_files_structure-GitHub.R:295:3',
    'test-03-get_files_structure-GitHub.R:334:3',
    'test-03-get_files_structure-GitLab.R:4:3',
    'test-03-get_repos_trees-GitStats.R:37:3',
    'test-03-get_repos_trees-GitStats.R:54:3',
    'test-04-get_files_content-GitHub.R:4:3',
    'test-04-get_files_content-GitHub.R:102:3',
    'test-04-get_files_content-GitLab.R:4:3',
    'test-04-get_files_content-GitLab.R:147:3',
    'test-04-get_files_content-GitLab.R:214:3', 'test-05-get_files.R:89:3',
    'test-05-get_files.R:104:3', 'test-06-get_issues-GitHub.R:4:3',
    'test-06-get_issues-GitLab.R:4:3', 'test-06-get_issues-GitStats.R:66:3',
    'test-06-get_issues-GitStats.R:103:3', 'test-get_commits_stats.R:29:3',
    'test-get_issues_stats.R:29:3', 'test-get_release-GitHub.R:4:3',
    'test-get_release-GitLab.R:4:3', 'test-get_release-GitLab.R:87:3',
    'test-get_release-GitLab.R:108:3', 'test-get_release-GitStats.R:38:3',
    'test-get_release-GitStats.R:70:3', 'test-get_urls_repos-GitHub.R:62:3',
    'test-get_urls_repos-GitHub.R:91:3', 'test-get_urls_repos-GitHub.R:115:3',
    'test-get_urls_repos-GitStats.R:131:3', 'test-get_user-GitHub.R:4:3',
    'test-get_user-GitLab.R:4:3', 'test-get_users-GitStats.R:53:3',
    'test-helpers.R:2:3', 'test-helpers.R:12:3', 'test-helpers.R:48:3',
    'test-helpers.R:56:3', 'test-helpers.R:62:3', 'test-helpers.R:80:3',
    'test-helpers.R:100:3', 'test-helpers.R:117:3', 'test-helpers.R:143:3',
    'test-helpers.R:173:3', 'test-helpers.R:183:3', 'test-helpers.R:193:3',
    'test-helpers.R:207:3', 'test-set_host.R:22:3', 'test-set_host.R:81:3',
    'test-set_host.R:181:3', 'test-z-GitStats.R:8:3', 'test-z-GitStats.R:13:3',
    'test-z-GitStats.R:17:3', 'test-z-GitStats.R:35:3', 'test-z-GitStats.R:41:3',
    'test-z-GitStats.R:89:3', 'test-z-GitStats.R:118:3',
    'test-z-GitStats.R:133:3'
  • empty test (10): 'test-00-api-requests.R:56:1',
    'test-06-get_issues-GitHub.R:30:1', 'test-set_host.R:3:1',
    'test-set_host.R:33:1', 'test-set_host.R:46:1', 'test-set_host.R:63:1',
    'test-set_host.R:92:1', 'test-set_host.R:114:1', 'test-set_host.R:132:1',
    'test-set_host.R:166:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-01-get_repos-GitHub.R:360:3'): `get_repos_with_code_from_host()` pulls raw response ──
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(in_files, function(filename) {
      rest_engine$search_for_code(code = code, filename = filename, 
          in_path = in_path, verbose = verbose)
  })`: i In index: 2.
  Caused by error:
  ! lexical error: invalid char in json text.
                                         HTTP/1.1 401 Unauthorized  Cont
                       (right here) ------^
  Backtrace:
       ▆
    1. ├─github_testhost_priv$get_repos_with_code_from_host(...)
    2. │ ├─purrr::list_flatten(...)
    3. │ │ └─vctrs::obj_check_list(x)
    4. │ └─purrr::map(...)
    5. │   └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    6. │     ├─purrr:::with_indexed_errors(...)
    7. │     │ └─base::withCallingHandlers(...)
    8. │     ├─purrr:::call_with_cleanup(...)
    9. │     └─GitStats (local) .f(.x[[i]], ...)
   10. │       └─rest_engine$search_for_code(...)
   11. │         └─self$response(search_endpoint)
   12. │           └─resp %>% httr2::resp_body_json(check_type = FALSE)
   13. ├─httr2::resp_body_json(., check_type = FALSE)
   14. │ └─jsonlite::fromJSON(text, simplifyVector = simplifyVector, ...)
   15. │   └─jsonlite:::parse_and_simplify(...)
   16. │     └─jsonlite:::parseJSON(txt, bigint_as_char)
   17. │       └─jsonlite:::parse_string(txt, bigint_as_char)
   18. └─base::.handleSimpleError(...)
   19.   └─purrr (local) h(simpleError(msg, call))
   20.     └─cli::cli_abort(...)
   21.       └─rlang::abort(...)
  
  [ FAIL 1 | WARN 0 | SKIP 115 | PASS 772 ]
  Error: Test failures
  Execution halted