Running ‘testthat.R’ [2s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(klassR)
  > 
  > test_check("klassR")
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 19 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_ApplyKlass.R:44'): Check levelCheck for numerical codes ────────
  Error: parse error: premature EOF
                                         {"codes":[{"code":"01","parentC
                       (right here) ------^
  
  Backtrace:
      ▆
   1. └─klassR::GetKlass(6, date = "2020-01-01") at test_ApplyKlass.R:44:2
   2.   └─jsonlite::fromJSON(klass_text, flatten = TRUE)
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_string(txt, bigint_as_char)
  ── Error ('test_ApplyKlass.R:76'): ApplyKlass works for variant classification with Norwegian characters in the variant name ──
  Error: parse error: premature EOF
                                         {"name":"Næringsgruppering 17 
                       (right here) ------^
  
  Backtrace:
      ▆
   1. └─klassR::ApplyKlass(...) at test_ApplyKlass.R:76:2
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::get_variant_name(variant)
   4.       └─jsonlite::fromJSON(variant_text, flatten = TRUE)
   5.         └─jsonlite:::parse_and_simplify(...)
   6.           └─jsonlite:::parseJSON(txt, bigint_as_char)
   7.             └─jsonlite:::parse_string(txt, bigint_as_char)
  ── Error ('test_GetKlass.R:33'): GetKlass returns a valid variant ──────────────
  Error: lexical error: invalid string in json text.
                                          {"name":"Næringsgruppering 17
                       (right here) ------^
  
  Backtrace:
      ▆
   1. └─klassR::GetKlass(klass = 6, variant = 1616, date = "2021-01-02") at test_GetKlass.R:33:2
   2.   └─klassR:::get_variant_name(variant)
   3.     └─jsonlite::fromJSON(variant_text, flatten = TRUE)
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_string(txt, bigint_as_char)
  
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 19 ]
  Error: Test failures
  Execution halted