Running ‘spelling.R’
  Running ‘testthat.R’ [16s/22s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("httptest2")
  Loading required package: httptest2
  Saving _problems/test-expect-request-header-31.R
  Saving _problems/test-expect-request-header-40.R
  Saving _problems/test-expect-request-header-162.R
  Saving _problems/test-expect-request-46.R
  Saving _problems/test-expect-request-88.R
  [ FAIL 5 | WARN 0 | SKIP 2 | PASS 233 ]
  
  ══ Skipped tests (2) ═══════════════════════════════════════════════════════════
  • TODO: handle URL escaping (1): 'test-redact.R:180:5'
  • TODO: prettify when simplify=FALSE (1): 'test-capture-requests.R:227:5'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-expect-request-header.R:23:5'): expect_request_header with mock API ──
  Expected failure message to match regexp "Header \"accept\" does not match \"image/jpeg\"".
  Actual message:
  x | Expected Header "accept" to match regexp "image/jpeg".
    | Actual text:
    | x | image/png
  ── Failure ('test-expect-request-header.R:32:5'): expect_request_header with mock API ──
  Expected failure message to match regexp "Header \"accept\" is not NULL".
  Actual message:
  x | Expected Header "accept" to be NULL.
    | Differences:
    | `actual` is a character vector ('image/png')
    | `expected` is NULL
    | 
  ── Failure ('test-expect-request-header.R:153:5'): expect_request_header without_internet ──
  Expected `object` not to throw any errors.
  Actually got a <httptest2_request> with message:
    An unexpected request was made:
    GET http://httpbin.not/
  Backtrace:
       ▆
    1. ├─httptest2::expect_no_request(...) at test-expect-request-header.R:153:5
    2. │ └─testthat::expect_error(object, NA, ..., class = "httptest2_request")
    3. │   └─testthat:::expect_condition_matching_(...)
    4. │     └─testthat:::quasi_capture(...)
    5. │       ├─testthat (local) .capture(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. ├─testthat::expect_failure(...)
    9. │ └─testthat:::capture_success_failure(expr)
   10. │   └─base::withCallingHandlers(...)
   11. ├─httptest2::expect_request_header(...)
   12. │ └─httptest2:::with_mocked_responses(header_mocker, expr)
   13. │   └─(utils::getFromNamespace("with_mocked_responses", "httr2"))(...)
   14. │     └─withr::with_options(list(httr2_mock = mock), code)
   15. │       └─base::force(code)
   16. ├─... %>% req_perform()
   17. └─httr2::req_perform(.)
   18.   └─httptest2 (local) mock(req)
   19.     └─httptest2 (local) current_mocker(req)
   20.       └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request")
  ── Failure ('test-expect-request.R:43:7'): expect_VERB when no request is made ──
  Expected failure message to match regexp "No request was made".
  Actual message:
  x | Expected `object` to throw a error with class <httptest2_request>.
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-expect-request.R:41:5
   2. │ └─base::withCallingHandlers(...)
   3. └─testthat::expect_failure(expect_POST("just a string"), "No request was made") at test-expect-request.R:43:7
  ── Error ('test-expect-request.R:75:5'): expect_request without_internet ───────
  <httptest2_request/rlang_error/error/condition>
  Error in `mock(req)`: An unexpected request was made:
  POST http://httpbin.not/get {"test":true}
  Backtrace:
       ▆
    1. ├─testthat::expect_failure(...) at test-expect-request.R:75:5
    2. │ └─testthat:::capture_success_failure(expr)
    3. │   └─base::withCallingHandlers(...)
    4. ├─httptest2::expect_POST(...)
    5. │ └─httptest2:::expect_request(object, "POST ", url, " ", ...)
    6. │   ├─base::withCallingHandlers(...)
    7. │   └─testthat::expect_error(...)
    8. │     └─testthat:::expect_condition_matching_(...)
    9. │       └─testthat:::quasi_capture(...)
   10. │         ├─testthat (local) .capture(...)
   11. │         │ └─base::withCallingHandlers(...)
   12. │         └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   13. └─httr2::req_perform(this_req)
   14.   └─httptest2 (local) mock(req)
   15.     └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request")
  
  [ FAIL 5 | WARN 0 | SKIP 2 | PASS 233 ]
  Error:
  ! Test failures.
  Execution halted