Running ‘testthat.R’ [9s/12s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(h3jsr)
  > 
  > test_check("h3jsr")
  Reading layer `nc' from data source `/home/ripley/R/Lib32/sf/shape/nc.shp' using driver `ESRI Shapefile'
  Simple feature collection with 100 features and 14 fields
  Geometry type: MULTIPOLYGON
  Dimension:     XY
  Bounding box:  xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
  CRS:           4267
  Reading layer `nc' from data source `/home/ripley/R/Lib32/sf/shape/nc.shp' using driver `ESRI Shapefile'
  Simple feature collection with 100 features and 14 fields
  Geometry type: MULTIPOLYGON
  Dimension:     XY
  Bounding box:  xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
  CRS:           4267
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (???): get_children returns correctly ─────────────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::get_children(h3_address = "86be8d12fffffff", res = 8)
   2.   └─sesh$eval("for (var i = 0; i < evalThis.length; i++) {\n            evalThis[i].h3_children = h3.h3ToChildren(evalThis[i].h3_address, evalThis[i].h3_res);\n            };")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): get_kring returns correctly ────────────────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::get_kring(h3_address = "86be8d12fffffff", ring_size = 2)
   2.   └─sesh$eval("for (var i = 0; i < evalThis.length; i++) {\n            evalThis[i].h3_kring = h3.kRing(evalThis[i].h3_address, evalThis[i].ring_size);\n            };")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): get_kring_list returns correctly ───────────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::get_kring_list(h3_address = "86be8d12fffffff", ring_size = 2)
   2.   └─sesh$eval("for (var i = 0; i < evalThis.length; i++) {\n            evalThis[i].h3_kringd = h3.kRingDistances(evalThis[i].h3_address, evalThis[i].ring_size);\n            };")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): get_ring returns correctly ─────────────────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::get_ring(h3_address = "86be8d12fffffff", ring_size = 2)
   2.   └─sesh$eval("for (var i = 0; i < evalThis.length; i++) {\n            evalThis[i].h3_ring = h3.hexRing(evalThis[i].h3_address, evalThis[i].ring_size);\n            };")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): polyfill returns correctly ─────────────────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
       █
    1. ├─testthat::expect_message(...)
    2. │ └─testthat:::quasi_capture(enquo(object), label, capture_messages)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─h3jsr::polyfill(geometry = sf::st_transform(nc1, 4326), res = 10)
    7.   └─sesh$eval("var h3_addresses = {};\n            for (var i = 0; i < evalThis.features.length; i++) {\n              var comp_h3a = [];\n              if (evalThis.features[i].geometry.type == \"MultiPolygon\") {\n                for (var j = 0; j < evalThis.features[i].geometry.coordinates.length; j++) {\n                comp_h3a.push(h3.polyfill(evalThis.features[i].geometry.coordinates[j], res, true));\n              }\n              h3_addresses[i] = [].concat.apply([], comp_h3a)\n              } else {\n                h3_addresses[i] = h3.polyfill(evalThis.features[i].geometry.coordinates, res, true);\n              }};")
    8.     └─V8:::evaluate_js(src, serialize = serialize)
    9.       ├─V8:::get_str_output(...)
   10.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): set_to_multipolygon returns correctly ──────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::get_kring(h3_address = val, ring_size = 2)
   2.   └─sesh$eval("for (var i = 0; i < evalThis.length; i++) {\n            evalThis[i].h3_kring = h3.kRing(evalThis[i].h3_address, evalThis[i].ring_size);\n            };")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): compact returns correctly ──────────────────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::polyfill(geometry = nc1, res = 6)
   2.   └─sesh$eval("var h3_addresses = {};\n            for (var i = 0; i < evalThis.features.length; i++) {\n              var comp_h3a = [];\n              if (evalThis.features[i].geometry.type == \"MultiPolygon\") {\n                for (var j = 0; j < evalThis.features[i].geometry.coordinates.length; j++) {\n                comp_h3a.push(h3.polyfill(evalThis.features[i].geometry.coordinates[j], res, true));\n              }\n              h3_addresses[i] = [].concat.apply([], comp_h3a)\n              } else {\n                h3_addresses[i] = h3.polyfill(evalThis.features[i].geometry.coordinates, res, true);\n              }};")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): uncompact returns correctly ────────────────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::polyfill(geometry = nc1, res = 6)
   2.   └─sesh$eval("var h3_addresses = {};\n            for (var i = 0; i < evalThis.features.length; i++) {\n              var comp_h3a = [];\n              if (evalThis.features[i].geometry.type == \"MultiPolygon\") {\n                for (var j = 0; j < evalThis.features[i].geometry.coordinates.length; j++) {\n                comp_h3a.push(h3.polyfill(evalThis.features[i].geometry.coordinates[j], res, true));\n              }\n              h3_addresses[i] = [].concat.apply([], comp_h3a)\n              } else {\n                h3_addresses[i] = h3.polyfill(evalThis.features[i].geometry.coordinates, res, true);\n              }};")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): grid_path returns correctly ────────────────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::grid_path("86be8d12fffffff", "86be8d127ffffff")
   2.   └─sesh$eval("for (var i = 0; i < evalThis.length; i++) {\n            evalThis[i].grid_path = h3.h3Line(evalThis[i].origin, evalThis[i].destination);\n            };")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): h3_to_line returns correctly - data.frame with list-column ─────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::get_kring_list("8abe8d12acaffff", 4)
   2.   └─sesh$eval("for (var i = 0; i < evalThis.length; i++) {\n            evalThis[i].h3_kringd = h3.kRingDistances(evalThis[i].h3_address, evalThis[i].ring_size);\n            };")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): get_gcdist performs as expected ────────────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::get_gcdist(pt1[1, ], pt2[1, ])
   2.   └─sesh$eval("var gcd = [];\n            for (var i = 0; i < pt1.length; i++) {\n              gcd[i] = h3.pointDist(pt1[i], pt2[i], units);\n            };")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): get_udends returns correctly ───────────────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::get_udends("166be8d12fffffff")
   2.   └─sesh$eval("for (var i = 0; i < evalThis.length; i++) {\n            evalThis[i].h3_ends = h3.getH3IndexesFromUnidirectionalEdge(evalThis[i].h3_edge);\n            };")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  ── Error (???): get_udedges returns correctly ──────────────────────────────────
  Error: TypeError: undefined is not a function
  Backtrace:
      █
   1. └─h3jsr::get_udedges(h3_address = "86be8d12fffffff")
   2.   └─sesh$eval("for (var i = 0; i < evalThis.length; i++) {\n            evalThis[i].h3_edges = h3.getH3UnidirectionalEdgesFromHexagon(evalThis[i].h3_address);\n            };")
   3.     └─V8:::evaluate_js(src, serialize = serialize)
   4.       ├─V8:::get_str_output(...)
   5.       └─V8:::context_eval(join(src), private$context, serialize)
  
  [ FAIL 13 | WARN 4 | SKIP 0 | PASS 255 ]
  Error: Test failures
  Execution halted