Running ‘testthat.R’ [6s/8s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(vegawidget)
  > 
  > test_check("vegawidget")
  
  Attaching package: 'rlang'
  
  The following objects are masked from 'package:withr':
  
      local_options, with_options
  
  The following objects are masked from 'package:testthat':
  
      is_false, is_null, is_true
  
  [ FAIL 13 | WARN 0 | SKIP 5 | PASS 77 ]
  
  ══ Skipped tests (5) ═══════════════════════════════════════════════════════════
  • On CRAN (5): 'test-callback-helpers.R:9:3', 'test-callback-helpers.R:46:3',
    'test-spec-version.R:38:3', 'test-vega-version.R:3:3', 'test-vegaspec.R:86:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-autosize.R:56:3'): autosize works ──────────────────────────────
  Error in `.make_numeric_version(x, strict, .standard_regexps()$valid_package_version, 
      "package_version")`: invalid non-character version specification 'x' (type: list)
  Backtrace:
      ▆
   1. └─vegawidget::vw_to_vega(spec_mtcars) at test-autosize.R:56:2
   2.   ├─vegawidget:::.vw_to_vega(as_vegaspec(spec))
   3.   └─vegawidget:::.vw_to_vega.vegaspec_vega_lite(as_vegaspec(spec))
   4.     └─vegawidget:::get_widget_string(...)
   5.       └─vegawidget:::get_candidate(version, candidates)
   6.         └─vegawidget (local) major(version)
   7.           └─base::package_version(x)
   8.             └─base::.make_numeric_version(...)
  ── Error ('test-handlers.R:99:3'): vw_add_event_handler() works ────────────────
  Error in `.make_numeric_version(x, strict, .standard_regexps()$valid_package_version, 
      "package_version")`: invalid non-character version specification 'x' (type: list)
  Backtrace:
       ▆
    1. ├─vegawidget(spec_mtcars) %>% ... at test-handlers.R:99:2
    2. ├─vegawidget::vw_add_event_listener(., "click", handler_body = "datum")
    3. │ └─htmlwidgets::onRender(x, js_call)
    4. │   └─htmlwidgets:::addHook(x, "render", jsCode, data)
    5. └─vegawidget::vegawidget(spec_mtcars)
    6.   └─vegawidget:::get_widget_string(...)
    7.     └─vegawidget:::get_candidate(version, candidates)
    8.       └─vegawidget (local) major(version)
    9.         └─base::package_version(x)
   10.           └─base::.make_numeric_version(...)
  ── Error ('test-to-image.R:55:3'): vw_to_svg works with vega spec ──────────────
  `cat(spec_mtcars %>% vw_to_vega() %>% vw_to_svg())` threw an unexpected error.
  Message: invalid non-character version specification 'x' (type: list)
  Class:   simpleError/error/condition
  ── Error ('test-to-image.R:63:3'): vw_to_svg works with vega-lite spec ─────────
  `cat(vw_to_svg(spec_mtcars))` threw an unexpected error.
  Message: invalid non-character version specification 'x' (type: list)
  Class:   simpleError/error/condition
  ── Error ('test-to-image.R:69:3'): vw_to_svg works with vega-lite spec ─────────
  `cat(vw_to_svg(spec_mtcars4))` threw an unexpected error.
  Message: invalid non-character version specification 'x' (type: list)
  Class:   simpleError/error/condition
  ── Error ('test-to-image.R:78:3'): vw_to_svg works with url data ───────────────
  `cat(vw_to_svg(spec_anscombe, base_url = base_url))` threw an unexpected error.
  Message: invalid non-character version specification 'x' (type: list)
  Class:   simpleError/error/condition
  ── Error ('test-to-image.R:83:3'): vw_to_svg works with url data ───────────────
  `cat(vw_to_svg(spec_wx, base_url = base_url))` threw an unexpected error.
  Message: invalid non-character version specification 'x' (type: list)
  Class:   simpleError/error/condition
  ── Error ('test-to-image.R:100:3'): vw_to_svg works with local data ────────────
  `cat(vw_to_svg(spec_anscombe, base_url = tempdir))` threw an unexpected error.
  Message: invalid non-character version specification 'x' (type: list)
  Class:   simpleError/error/condition
  ── Error ('test-to-image.R:111:3'): vw_to_svg works with local data ────────────
  `cat(vw_to_svg(spec_wx, base_url = tempdir))` threw an unexpected error.
  Message: invalid non-character version specification 'x' (type: list)
  Class:   simpleError/error/condition
  ── Error ('test-to-vega.R:3:3'): vw_to_vega works ──────────────────────────────
  Error in `.make_numeric_version(x, strict, .standard_regexps()$valid_package_version, 
      "package_version")`: invalid non-character version specification 'x' (type: list)
  Backtrace:
      ▆
   1. └─vegawidget::vw_to_vega(spec_mtcars) at test-to-vega.R:3:2
   2.   ├─vegawidget:::.vw_to_vega(as_vegaspec(spec))
   3.   └─vegawidget:::.vw_to_vega.vegaspec_vega_lite(as_vegaspec(spec))
   4.     └─vegawidget:::get_widget_string(...)
   5.       └─vegawidget:::get_candidate(version, candidates)
   6.         └─vegawidget (local) major(version)
   7.           └─base::package_version(x)
   8.             └─base::.make_numeric_version(...)
  ── Error ('test-vega-version.R:87:3'): get_candidate() works ───────────────────
  Error in `.make_numeric_version(x, strict, .standard_regexps()$valid_package_version, 
      "package_version")`: invalid non-character version specification 'x' (type: list)
  Backtrace:
      ▆
   1. ├─vegawidget (local) exp_ca(get_candidate("5", c("5.2.0", "4.1.7")), 1L, NULL) at test-vega-version.R:87:2
   2. │ └─testthat::expect_identical(result$index, index) at test-vega-version.R:78:4
   3. │   └─testthat::quasi_label(enquo(object), label, arg = "object")
   4. │     └─rlang::eval_bare(expr, quo_get_env(quo))
   5. └─vegawidget:::get_candidate("5", c("5.2.0", "4.1.7"))
   6.   └─vegawidget (local) major(version)
   7.     └─base::package_version(x)
   8.       └─base::.make_numeric_version(...)
  ── Error ('test-vega-version.R:108:3'): get_widget_string() works ──────────────
  Error in `.make_numeric_version(x, strict, .standard_regexps()$valid_package_version, 
      "package_version")`: invalid non-character version specification 'x' (type: list)
  Backtrace:
      ▆
   1. ├─testthat::expect_identical(...) at test-vega-version.R:108:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─vegawidget:::get_widget_string("vega-lite", "5", available)
   5.   └─vegawidget:::get_candidate(version, candidates)
   6.     └─vegawidget (local) major(version)
   7.       └─base::package_version(x)
   8.         └─base::.make_numeric_version(...)
  ── Error ('test-vegaspec.R:18:3'): class is correct ────────────────────────────
  Error in `.make_numeric_version(x, strict, .standard_regexps()$valid_package_version, 
      "package_version")`: invalid non-character version specification 'x' (type: list)
  Backtrace:
      ▆
   1. └─vegawidget::vw_to_vega(spec_mtcars) at test-vegaspec.R:18:2
   2.   ├─vegawidget:::.vw_to_vega(as_vegaspec(spec))
   3.   └─vegawidget:::.vw_to_vega.vegaspec_vega_lite(as_vegaspec(spec))
   4.     └─vegawidget:::get_widget_string(...)
   5.       └─vegawidget:::get_candidate(version, candidates)
   6.         └─vegawidget (local) major(version)
   7.           └─base::package_version(x)
   8.             └─base::.make_numeric_version(...)
  
  [ FAIL 13 | WARN 0 | SKIP 5 | PASS 77 ]
  Error: Test failures
  Execution halted