Running ‘testthat.R’ [39s/51s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("rmapshaper")
  > 
  > test_check("rmapshaper")
  ── 1. Error: ms_clip.geo_json works (@test-clip_erase.R#70)  ───────────────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolygons (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
   1. rmapshaper::ms_clip(poly, clip_poly)
   2. rmapshaper:::ms_clip.geo_json(poly, clip_poly)
   3. rmapshaper:::clip_erase_json(...)
   4. rmapshaper:::mapshaper_clip_erase(...)
   5. ms$eval(...)
   6. V8:::evaluate_js(src, serialize = serialize)
   8. V8:::context_eval(join(src), private$context, serialize)
  
  ── 2. Error: ms_clip.character works (@test-clip_erase.R#81)  ──────────────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolygons (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
   1. rmapshaper::ms_clip(unclass(poly), unclass(clip_poly))
   2. rmapshaper:::ms_clip.character(unclass(poly), unclass(clip_poly))
   3. rmapshaper:::clip_erase_json(...)
   4. rmapshaper:::mapshaper_clip_erase(...)
   5. ms$eval(...)
   6. V8:::evaluate_js(src, serialize = serialize)
   8. V8:::context_eval(join(src), private$context, serialize)
  
  ── 3. Error: ms_erase.geo_json works (@test-clip_erase.R#89)  ──────────────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolygons (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
   1. rmapshaper::ms_erase(poly, clip_poly)
   2. rmapshaper:::ms_erase.geo_json(poly, clip_poly)
   3. rmapshaper:::clip_erase_json(...)
   4. rmapshaper:::mapshaper_clip_erase(...)
   5. ms$eval(...)
   6. V8:::evaluate_js(src, serialize = serialize)
   8. V8:::context_eval(join(src), private$context, serialize)
  
  ── 4. Error: ms_erase.character works (@test-clip_erase.R#100)  ────────────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolygons (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
   1. rmapshaper::ms_erase(unclass(poly), unclass(clip_poly))
   2. rmapshaper:::ms_erase.character(unclass(poly), unclass(clip_poly))
   3. rmapshaper:::clip_erase_json(...)
   4. rmapshaper:::mapshaper_clip_erase(...)
   5. ms$eval(...)
   6. V8:::evaluate_js(src, serialize = serialize)
   8. V8:::context_eval(join(src), private$context, serialize)
  
  ── 5. Error: ms_clip.SpatialPolygons works (@test-clip_erase.R#109)  ───────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolygons (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
   1. rmapshaper::ms_clip(poly_spdf, clip_poly_spdf)
   2. rmapshaper:::ms_clip.SpatialPolygons(poly_spdf, clip_poly_spdf)
   3. rmapshaper:::clip_erase_sp(...)
   4. rmapshaper:::mapshaper_clip_erase(...)
   5. ms$eval(...)
   6. V8:::evaluate_js(src, serialize = serialize)
   8. V8:::context_eval(join(src), private$context, serialize)
  
  ── 6. Error: ms_erase.SpatialPolygons works (@test-clip_erase.R#123)  ──────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolygons (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
   1. rmapshaper::ms_erase(poly_spdf, clip_poly_spdf)
   2. rmapshaper:::ms_erase.SpatialPolygons(poly_spdf, clip_poly_spdf)
   3. rmapshaper:::clip_erase_sp(...)
   4. rmapshaper:::mapshaper_clip_erase(...)
   5. ms$eval(...)
   6. V8:::evaluate_js(src, serialize = serialize)
   8. V8:::context_eval(join(src), private$context, serialize)
  
  ── 7. Error: warning occurs when non-identical CRS (@test-clip_erase.R#138)  ───
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolygons (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
    1. testthat::expect_warning(ms_clip(poly_spdf, diff_crs), "target and clip do not have identical CRS")
    7. rmapshaper:::ms_clip.SpatialPolygons(poly_spdf, diff_crs)
    8. rmapshaper:::clip_erase_sp(...)
    9. rmapshaper:::mapshaper_clip_erase(...)
   10. ms$eval(...)
   11. V8:::evaluate_js(src, serialize = serialize)
   13. V8:::context_eval(join(src), private$context, serialize)
  
  ── 8. Error: ms_clip works with lines (@test-clip_erase.R#147)  ────────────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolylines (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
    1. testthat::expect_equivalent(...)
    7. rmapshaper:::ms_clip.geo_json(line, clip_poly)
    8. rmapshaper:::clip_erase_json(...)
    9. rmapshaper:::mapshaper_clip_erase(...)
   10. ms$eval(...)
   11. V8:::evaluate_js(src, serialize = serialize)
   13. V8:::context_eval(join(src), private$context, serialize)
  
  ── 9. Error: ms_erase works with lines (@test-clip_erase.R#162)  ───────────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolylines (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
    1. testthat::expect_equivalent(...)
    7. rmapshaper:::ms_erase.geo_json(line, clip_poly)
    8. rmapshaper:::clip_erase_json(...)
    9. rmapshaper:::mapshaper_clip_erase(...)
   10. ms$eval(...)
   11. V8:::evaluate_js(src, serialize = serialize)
   13. V8:::context_eval(join(src), private$context, serialize)
  
  ── 10. Error: ms_clip works with points (@test-clip_erase.R#176)  ──────────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPoints (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
    1. testthat::expect_equivalent(...)
    7. rmapshaper:::ms_clip.geo_json(points, clip_poly)
    8. rmapshaper:::clip_erase_json(...)
    9. rmapshaper:::mapshaper_clip_erase(...)
   10. ms$eval(...)
   11. V8:::evaluate_js(src, serialize = serialize)
   13. V8:::context_eval(join(src), private$context, serialize)
  
  ── 11. Error: ms_erase works with points (@test-clip_erase.R#190)  ─────────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPoints (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
    1. testthat::expect_equivalent(...)
    7. rmapshaper:::ms_erase.geo_json(points, clip_poly)
    8. rmapshaper:::clip_erase_json(...)
    9. rmapshaper:::mapshaper_clip_erase(...)
   10. ms$eval(...)
   11. V8:::evaluate_js(src, serialize = serialize)
   13. V8:::context_eval(join(src), private$context, serialize)
  
  ── 12. Error: bbox works (@test-clip_erase.R#201)  ─────────────────────────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolygons (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
    1. rmapshaper::ms_erase(poly, bbox = c(51, -45, 55, -40))
    2. rmapshaper:::ms_erase.geo_json(poly, bbox = c(51, -45, 55, -40))
    3. rmapshaper:::clip_erase_json(...)
    4. rmapshaper:::mapshaper_clip_erase(...)
    5. rmapshaper::apply_mapshaper_commands(...)
    6. ms$call("mapshaper.applyCommands", command, data, V8::JS(callback()))
    8. V8:::evaluate_js(src, serialize = TRUE)
   10. V8:::context_eval(join(src), private$context, serialize)
  
  ── 13. Error: clip works with sf objects (@test-clip_erase.R#232)  ─────────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolygons (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
    1. testthat::expect_is(ms_clip(poly_sf, clip_sf), "sf")
    5. rmapshaper:::ms_clip.sf(poly_sf, clip_sf)
    6. rmapshaper:::clip_erase_sf(...)
    7. rmapshaper:::mapshaper_clip_erase(...)
    8. ms$eval(...)
    9. V8:::evaluate_js(src, serialize = serialize)
   11. V8:::context_eval(join(src), private$context, serialize)
  
  ── 14. Error: erase works with sf objects (@test-clip_erase.R#244)  ────────────
  ReferenceUint8ClampedArray is not defined
      at unknown source
      at unknown source
      at Object.<anonymous> (unknown source)
      at o (unknown source)
      at unknown source
      at Object.getBoundsSearchFunction (unknown source)
      at new PathIndex (unknown source)
      at Object.clipPolygons (unknown source)
      at Object.clipLayerByLayer (unknown source)
      at unknown source
  Backtrace:
    1. testthat::expect_is(ms_erase(poly_sf, clip_sf), "sf")
    5. rmapshaper:::ms_erase.sf(poly_sf, clip_sf)
    6. rmapshaper:::clip_erase_sf(...)
    7. rmapshaper:::mapshaper_clip_erase(...)
    8. ms$eval(...)
    9. V8:::evaluate_js(src, serialize = serialize)
   11. V8:::context_eval(join(src), private$context, serialize)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 222 | SKIPPED: 21 | WARNINGS: 4 | FAILED: 14 ]
  1. Error: ms_clip.geo_json works (@test-clip_erase.R#70) 
  2. Error: ms_clip.character works (@test-clip_erase.R#81) 
  3. Error: ms_erase.geo_json works (@test-clip_erase.R#89) 
  4. Error: ms_erase.character works (@test-clip_erase.R#100) 
  5. Error: ms_clip.SpatialPolygons works (@test-clip_erase.R#109) 
  6. Error: ms_erase.SpatialPolygons works (@test-clip_erase.R#123) 
  7. Error: warning occurs when non-identical CRS (@test-clip_erase.R#138) 
  8. Error: ms_clip works with lines (@test-clip_erase.R#147) 
  9. Error: ms_erase works with lines (@test-clip_erase.R#162) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted