Running ‘testthat.R’ [2s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(czso)
  > 
  > test_check("czso")
  [ FAIL 5 | WARN 0 | SKIP 2 | PASS 0 ]
  
  ══ Skipped tests (2) ═══════════════════════════════════════════════════════════
  • On CRAN (2): 'test-core.R:4:3', 'test-core.R:15:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-catalogue.R:3:3'): catalogue and filter works ──────────────────
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `dplyr::mutate(., periodicity = dplyr::recode(.data$periodicity, 
      nikdy = "NEVER"))`: ℹ In argument: `periodicity = dplyr::recode(.data$periodicity, nikdy =
    "NEVER")`.
  Caused by error in `.data$periodicity`:
  ! Column `periodicity` not found in `.data`.
  ── Failure ('test-workflow-utilities.R:2:3'): schema retrieval works ───────────
  Expected `schm <- czso_get_table_schema("340130")` to run without any errors.
  ℹ Actually got a <simpleError> with text:
    lexical error: invalid char in json text.
                                           <!DOCTYPE html> <html> <head> <
                         (right here) ------^
    
  ── Error ('test-workflow-utilities.R:3:3'): schema retrieval works ─────────────
  Error in `eval(code, test_env)`: object 'schm' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_gte(ncol(schm), 5) at test-workflow-utilities.R:3:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─base::ncol(schm)
  ── Failure ('test-workflow-utilities.R:8:3'): documentation retrieval works ────
  Expected `doc_url <- czso_get_dataset_doc("340130")` to run without any errors.
  ℹ Actually got a <simpleError> with text:
    lexical error: invalid char in json text.
                                           <!DOCTYPE html> <html> <head> <
                         (right here) ------^
    
  ── Error ('test-workflow-utilities.R:9:3'): documentation retrieval works ──────
  Error in `eval(code, test_env)`: object 'doc_url' not found
  Backtrace:
      ▆
   1. └─testthat::expect_match(doc_url, "https\\:\\/\\/csu") at test-workflow-utilities.R:9:3
   2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  
  [ FAIL 5 | WARN 0 | SKIP 2 | PASS 0 ]
  Error: Test failures
  Execution halted