Running ‘testthat.R’ [8s/12s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(jqr)
  > 
  > test_check("jqr")
  [ FAIL 4 | WARN 0 | SKIP 1 | PASS 123 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • empty test (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-spec.R:100:3): runtime error ────────────────────────────────────
  Error: jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '5') at <builtin>, line 1:
  def halt_error: halt_error(5);                           
  Backtrace:
      ▆
   1. ├─testthat::expect_that(jqr("{}", ".", 0), equals("{}")) at test-spec.R:100:2
   2. │ └─testthat condition(object)
   3. │   └─testthat::expect_equal(x, expected, ..., expected.label = label)
   4. │     └─testthat::quasi_label(enquo(object), label, arg = "object")
   5. │       └─rlang::eval_bare(expr, quo_get_env(quo))
   6. ├─jqr:::jqr("{}", ".", 0)
   7. └─jqr:::jqr.default("{}", ".", 0)
   8.   └─jqr::jqr_new(query, flags = flags)
  ── Error (test-spec.R:110:3): query for hash ───────────────────────────────────
  Error: jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '5') at <builtin>, line 1:
  def halt_error: halt_error(5);                           
  Backtrace:
      ▆
   1. ├─testthat::expect_that(...) at test-spec.R:110:2
   2. │ └─testthat condition(object)
   3. │   └─testthat::expect_equal(x, expected, ..., expected.label = label)
   4. │     └─testthat::quasi_label(enquo(object), label, arg = "object")
   5. │       └─rlang::eval_bare(expr, quo_get_env(quo))
   6. ├─jqr:::jqr(jsonlite::toJSON(src), ".BAR[]", 0)
   7. └─jqr:::jqr.default(jsonlite::toJSON(src), ".BAR[]", 0)
   8.   └─jqr::jqr_new(query, flags = flags)
  ── Error (test-spec.R:117:3): query for array ──────────────────────────────────
  Error: jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '3') at <top-level>, line 1:
  .[3][]  
  Backtrace:
      ▆
   1. ├─testthat::expect_that(...) at test-spec.R:117:2
   2. │ └─testthat condition(object)
   3. │   └─testthat::expect_equal(x, expected, ..., expected.label = label)
   4. │     └─testthat::quasi_label(enquo(object), label, arg = "object")
   5. │       └─rlang::eval_bare(expr, quo_get_env(quo))
   6. ├─jqr:::jqr(jsonlite::toJSON(src), ".[3][]", 0)
   7. └─jqr:::jqr.default(jsonlite::toJSON(src), ".[3][]", 0)
   8.   └─jqr::jqr_new(query, flags = flags)
  ── Failure (test-spec.R:127:3): NA handling ────────────────────────────────────
  `jq(NA_character_)` threw an error with unexpected message.
  Expected match: "!is.na\\(json\\) is not TRUE"
  Actual message: "jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '5') at <builtin>, line 1:\ndef halt_error: halt_error(5);                           "
  Backtrace:
       ▆
    1. ├─testthat::expect_error(jq(NA_character_), "!is.na\\(json\\) is not TRUE") at test-spec.R:127:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─jqr::jq(NA_character_)
    7. └─jqr:::jq.character(NA_character_)
    8.   ├─base::structure(jqr(x, query, flags), class = c("jqson", "character"))
    9.   ├─jqr:::jqr(x, query, flags)
   10.   └─jqr:::jqr.default(x, query, flags)
   11.     └─jqr::jqr_new(query, flags = flags)
  
  [ FAIL 4 | WARN 0 | SKIP 1 | PASS 123 ]
  Error: Test failures
  Execution halted