Running ‘testthat.R’ [30s/36s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(texPreview)
  > test_check("texPreview")
  ── 1. Error: (unknown) (@test-tex.R#115)  ──────────────────────────────────────
  Magick: delegate failed `'trace' --svg --output '%o' '%i'' @ error/delegate.c/InvokeDelegate/1928
  1: testthat::describe("use svg device", {
         x <- texPreview::tex_preview(obj = xtable::xtable(head(iris, 10)), stem = "danp-test")
         it("check if file created", {
             testthat::expect_equal(length(list.files(path, pattern = "svg$")), 1)
         })
     }) at testthat/test-tex.R:115
  2: eval(substitute(code), describe_environment)
  3: eval(substitute(code), describe_environment)
  4: texPreview::tex_preview(obj = xtable::xtable(head(iris, 10)), stem = "danp-test") at testthat/test-tex.R:117
  5: tex_preview.xtable(obj = xtable::xtable(head(iris, 10)), stem = "danp-test")
  6: tex_preview(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, margin, 
         imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, svg_max, 
         print.xtable.opts, opts.html, markers, ...)
  7: tex_preview.character(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, 
         margin, imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, 
         svg_max, print.xtable.opts, opts.html, markers, ...)
  8: tex_preview.default(obj, tex_lines, stem, overwrite, keep_pdf, tex_message, fileDir, 
         margin, imgFormat, returnType, resizebox, usrPackages, engine, cleanup, density, 
         svg_max, print.xtable.opts, opts.html, markers, ...)
  9: tex_image(obj, stem, write_flag, overwrite)
  10: magick::image_write(imgOut, tex_path(fileDir, stem, dev = imgFormat))
  11: magick_image_write(image, format, quality, depth, density, comment)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 36 | SKIPPED: 1 | WARNINGS: 0 | FAILED: 1 ]
  1. Error: (unknown) (@test-tex.R#115) 
  
  Error: testthat unit tests failed
  Execution halted