Package: air Check: tests New result: ERROR Running ‘testthat.R’ [2s/2s] 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(air) > > test_check("air") [ FAIL 1 | WARN 1 | SKIP 0 | PASS 6 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-credentials.R:23:7'): BAD: catches an missing API key ────────── Error in `paste0("Bearer ", key)`: cannot coerce type 'closure' to vector of type 'character' Backtrace: ▆ 1. ├─testthat::expect_error(bad_no_api_key(), "set your OpenAI key and model") at test-credentials.R:27: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. └─air (local) bad_no_api_key() 8. ├─air:::with_stubbed_credentials(...) at test-credentials.R:21:5 9. └─air::howto("How do I get the first element of a list?") at test-credentials.R:23:7 10. └─air:::api_answer_or_stop(do, creds, context, call_api) [ FAIL 1 | WARN 1 | SKIP 0 | PASS 6 ] Error: Test failures Execution halted Ran 10/10 deferred expressions