Running ‘testthat.R’ [0m/28m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for packages that use 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/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(kvkapiR)
  > 
  > test_check("kvkapiR")
  v KVK_API_KEY has been set for this session.
  Saving _problems/test-kvk_retrieve-8.R
  i You are using the KvK test environment. Test data will be returned.
  i You are using the KvK test environment. Test data will be returned.
  i You are using the KvK test environment. Test data will be returned.
  Saving _problems/test-kvk_retrieve-28.R
  Saving _problems/test-kvk_retrieve-39.R
  Saving _problems/test-kvk_retrieve-69.R
  Saving _problems/test-kvk_retrieve-98.R
  Saving _problems/test-kvk_search-8.R
  Saving _problems/test-kvk_search-51.R
  i No results found (HTTP 404).
  v Max cost: EUR 5.00 for this session
  Format: "summary"
  Records: 1
  Format: "detailed"
  Records: 2
  [ FAIL 7 | WARN 0 | SKIP 11 | PASS 155 ]
  
  ══ Skipped tests (11) ══════════════════════════════════════════════════════════
  • API key not available (3): 'test-kvk_retrieve.R:78:3',
    'test-list-to-tibble-robustness.R:71:3',
    'test-list-to-tibble-robustness.R:101:3'
  • API key not available for usage tracking tests (4):
    'test-utils-usage-tracking.R:89:3', 'test-utils-usage-tracking.R:116:3',
    'test-utils-usage-tracking.R:330:3', 'test-utils-usage-tracking.R:419:3'
  • Complex mocking required for httr2 responses (1):
    'test-ipd-error-handling.R:44:3'
  • No API key available (1): 'test-ipd-error-handling.R:60:3'
  • No API key available for testing (2): 'test-kvk_search.R:32:3',
    'test-kvk_search.R:64:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-kvk_retrieve.R:5:3'): kvk_get_basisprofiel works with test environment ──
  <rlib_error_3_0/rlib_error/error/condition>
  Error in `"fun(..., .envir = .envir)"`: ! Could not evaluate cli `{}` expression: `api_name`.
  Caused by error in `eval(expr, envir = envir)`:
  ! object 'api_name' not found
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-kvk_retrieve.R:5:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─kvkapiR::kvk_get_basisprofiel("68750110", test_environment = TRUE)
    8. │ └─base::tryCatch(...)
    9. │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10. │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │       └─value[[3L]](cond)
   12. │         └─cli::cli_abort("Connection error accessing {api_name}: {e$message}")
   13. │           └─cli:::vcapply(message, format_inline, .envir = .envir)
   14. │             └─base::vapply(X, FUN, FUN.VALUE = character(1), ..., USE.NAMES = USE.NAMES)
   15. │               └─cli (local) FUN(X[[i]], ...)
   16. │                 ├─cli::cli_fmt(...)
   17. │                 │ └─cli:::cli__rec(expr)
   18. │                 └─cli (local) fun(..., .envir = .envir)
   19. │                   ├─cli:::cli__message(...)
   20. │                   │ └─"id" %in% names(args)
   21. │                   └─cli:::glue_cmd(..., .envir = .envir, .call = sys.call(), .trim = FALSE)
   22. │                     └─cli:::glue(...)
   23. ├─cli (local) `<fn>`("api_name")
   24. │ ├─.transformer(expr, .envir) %||% character()
   25. │ └─cli (local) .transformer(expr, .envir)
   26. │   ├─eval(expr, envir = envir) %??% ...
   27. │   │ └─chain_error(expr, err, srcref = utils::getSrcref(sys.call()))
   28. │   │   └─base::withCallingHandlers(...)
   29. │   └─base::eval(expr, envir = envir)
   30. │     └─base::eval(expr, envir = envir)
   31. └─base::.handleSimpleError(...)
   32.   └─h(simpleError(msg, call))
   33.     └─throw_error(err, parent = e)
  ── Error ('test-kvk_retrieve.R:28:3'): kvk_get_basisprofiel handles geoData parameter ──
  <rlib_error_3_0/rlib_error/error/condition>
  Error in `"fun(..., .envir = .envir)"`: ! Could not evaluate cli `{}` expression: `api_name`.
  Caused by error in `eval(expr, envir = envir)`:
  ! object 'api_name' not found
  Backtrace:
       ▆
    1. ├─kvkapiR::kvk_get_basisprofiel("68750110", geoData = TRUE, test_environment = TRUE) at test-kvk_retrieve.R:28:3
    2. │ └─base::tryCatch(...)
    3. │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    4. │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
    5. │       └─value[[3L]](cond)
    6. │         └─cli::cli_abort("Connection error accessing {api_name}: {e$message}")
    7. │           └─cli:::vcapply(message, format_inline, .envir = .envir)
    8. │             └─base::vapply(X, FUN, FUN.VALUE = character(1), ..., USE.NAMES = USE.NAMES)
    9. │               └─cli (local) FUN(X[[i]], ...)
   10. │                 ├─cli::cli_fmt(...)
   11. │                 │ └─cli:::cli__rec(expr)
   12. │                 └─cli (local) fun(..., .envir = .envir)
   13. │                   ├─cli:::cli__message(...)
   14. │                   │ └─"id" %in% names(args)
   15. │                   └─cli:::glue_cmd(..., .envir = .envir, .call = sys.call(), .trim = FALSE)
   16. │                     └─cli:::glue(...)
   17. ├─cli (local) `<fn>`("api_name")
   18. │ ├─.transformer(expr, .envir) %||% character()
   19. │ └─cli (local) .transformer(expr, .envir)
   20. │   ├─eval(expr, envir = envir) %??% ...
   21. │   │ └─chain_error(expr, err, srcref = utils::getSrcref(sys.call()))
   22. │   │   └─base::withCallingHandlers(...)
   23. │   └─base::eval(expr, envir = envir)
   24. │     └─base::eval(expr, envir = envir)
   25. └─base::.handleSimpleError(...)
   26.   └─h(simpleError(msg, call))
   27.     └─throw_error(err, parent = e)
  ── Error ('test-kvk_retrieve.R:36:3'): kvk_get_basisprofiel handles include parameter correctly ──
  <rlib_error_3_0/rlib_error/error/condition>
  Error in `"fun(..., .envir = .envir)"`: ! Could not evaluate cli `{}` expression: `api_name`.
  Caused by error in `eval(expr, envir = envir)`:
  ! object 'api_name' not found
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-kvk_retrieve.R:36:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─kvkapiR::kvk_get_basisprofiel(...)
    8. │ └─base::tryCatch(...)
    9. │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10. │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │       └─value[[3L]](cond)
   12. │         └─cli::cli_abort("Connection error accessing {api_name}: {e$message}")
   13. │           └─cli:::vcapply(message, format_inline, .envir = .envir)
   14. │             └─base::vapply(X, FUN, FUN.VALUE = character(1), ..., USE.NAMES = USE.NAMES)
   15. │               └─cli (local) FUN(X[[i]], ...)
   16. │                 ├─cli::cli_fmt(...)
   17. │                 │ └─cli:::cli__rec(expr)
   18. │                 └─cli (local) fun(..., .envir = .envir)
   19. │                   ├─cli:::cli__message(...)
   20. │                   │ └─"id" %in% names(args)
   21. │                   └─cli:::glue_cmd(..., .envir = .envir, .call = sys.call(), .trim = FALSE)
   22. │                     └─cli:::glue(...)
   23. ├─cli (local) `<fn>`("api_name")
   24. │ ├─.transformer(expr, .envir) %||% character()
   25. │ └─cli (local) .transformer(expr, .envir)
   26. │   ├─eval(expr, envir = envir) %??% ...
   27. │   │ └─chain_error(expr, err, srcref = utils::getSrcref(sys.call()))
   28. │   │   └─base::withCallingHandlers(...)
   29. │   └─base::eval(expr, envir = envir)
   30. │     └─base::eval(expr, envir = envir)
   31. └─base::.handleSimpleError(...)
   32.   └─h(simpleError(msg, call))
   33.     └─throw_error(err, parent = e)
  ── Error ('test-kvk_retrieve.R:66:3'): kvk_get_vestigingsprofiel works with test environment ──
  <rlib_error_3_0/rlib_error/error/condition>
  Error in `"fun(..., .envir = .envir)"`: ! Could not evaluate cli `{}` expression: `api_name`.
  Caused by error in `eval(expr, envir = envir)`:
  ! object 'api_name' not found
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-kvk_retrieve.R:66:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─kvkapiR::kvk_get_vestigingsprofiel("000037178598", test_environment = TRUE)
    8. │ └─base::tryCatch(...)
    9. │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10. │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │       └─value[[3L]](cond)
   12. │         └─cli::cli_abort("Connection error accessing {api_name}: {e$message}")
   13. │           └─cli:::vcapply(message, format_inline, .envir = .envir)
   14. │             └─base::vapply(X, FUN, FUN.VALUE = character(1), ..., USE.NAMES = USE.NAMES)
   15. │               └─cli (local) FUN(X[[i]], ...)
   16. │                 ├─cli::cli_fmt(...)
   17. │                 │ └─cli:::cli__rec(expr)
   18. │                 └─cli (local) fun(..., .envir = .envir)
   19. │                   ├─cli:::cli__message(...)
   20. │                   │ └─"id" %in% names(args)
   21. │                   └─cli:::glue_cmd(..., .envir = .envir, .call = sys.call(), .trim = FALSE)
   22. │                     └─cli:::glue(...)
   23. ├─cli (local) `<fn>`("api_name")
   24. │ ├─.transformer(expr, .envir) %||% character()
   25. │ └─cli (local) .transformer(expr, .envir)
   26. │   ├─eval(expr, envir = envir) %??% ...
   27. │   │ └─chain_error(expr, err, srcref = utils::getSrcref(sys.call()))
   28. │   │   └─base::withCallingHandlers(...)
   29. │   └─base::eval(expr, envir = envir)
   30. │     └─base::eval(expr, envir = envir)
   31. └─base::.handleSimpleError(...)
   32.   └─h(simpleError(msg, call))
   33.     └─throw_error(err, parent = e)
  ── Error ('test-kvk_retrieve.R:95:3'): kvk_get_naamgeving works with test environment ──
  <rlib_error_3_0/rlib_error/error/condition>
  Error in `"fun(..., .envir = .envir)"`: ! Could not evaluate cli `{}` expression: `api_name`.
  Caused by error in `eval(expr, envir = envir)`:
  ! object 'api_name' not found
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-kvk_retrieve.R:95:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─kvkapiR::kvk_get_naamgeving("68750110", test_environment = TRUE)
    8. │ └─base::tryCatch(...)
    9. │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10. │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │       └─value[[3L]](cond)
   12. │         └─cli::cli_abort("Connection error accessing {api_name}: {e$message}")
   13. │           └─cli:::vcapply(message, format_inline, .envir = .envir)
   14. │             └─base::vapply(X, FUN, FUN.VALUE = character(1), ..., USE.NAMES = USE.NAMES)
   15. │               └─cli (local) FUN(X[[i]], ...)
   16. │                 ├─cli::cli_fmt(...)
   17. │                 │ └─cli:::cli__rec(expr)
   18. │                 └─cli (local) fun(..., .envir = .envir)
   19. │                   ├─cli:::cli__message(...)
   20. │                   │ └─"id" %in% names(args)
   21. │                   └─cli:::glue_cmd(..., .envir = .envir, .call = sys.call(), .trim = FALSE)
   22. │                     └─cli:::glue(...)
   23. ├─cli (local) `<fn>`("api_name")
   24. │ ├─.transformer(expr, .envir) %||% character()
   25. │ └─cli (local) .transformer(expr, .envir)
   26. │   ├─eval(expr, envir = envir) %??% ...
   27. │   │ └─chain_error(expr, err, srcref = utils::getSrcref(sys.call()))
   28. │   │   └─base::withCallingHandlers(...)
   29. │   └─base::eval(expr, envir = envir)
   30. │     └─base::eval(expr, envir = envir)
   31. └─base::.handleSimpleError(...)
   32.   └─h(simpleError(msg, call))
   33.     └─throw_error(err, parent = e)
  ── Error ('test-kvk_search.R:5:3'): kvk_search works with test environment ─────
  Error in `value[[3L]](cond)`: Failed to perform HTTP request.
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-kvk_search.R:5:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─kvkapiR::kvk_search(plaats = "Utrecht", test_environment = TRUE)
    8.   └─base::tryCatch(...)
    9.     └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10.       └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11.         └─value[[3L]](cond)
   12.           └─cli::cli_abort(e$message)
   13.             └─rlang::abort(...)
  ── Error ('test-kvk_search.R:45:3'): kvk_search handles various parameters ─────
  Error in `value[[3L]](cond)`: Failed to perform HTTP request.
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-kvk_search.R:45:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─kvkapiR::kvk_search(plaats = "Utrecht", test_environment = TRUE)
    8.   └─base::tryCatch(...)
    9.     └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10.       └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11.         └─value[[3L]](cond)
   12.           └─cli::cli_abort(e$message)
   13.             └─rlang::abort(...)
  
  [ FAIL 7 | WARN 0 | SKIP 11 | PASS 155 ]
  Error:
  ! Test failures.
  Execution halted