Skip to content

Commit 9f469e6

Browse files
committed
leverage new vdiffr::expect_doppelganger() arg
1 parent a09ccb6 commit 9f469e6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

inst/docker/Dockerfile.vtest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ RUN printf '#!/bin/bash \nxvfb-run --auto-servernum --server-args "-screen 0 640
8686
RUN chmod 777 /usr/bin/orca
8787

8888
# install visual testing packages
89-
RUN R -e "devtools::install_github('cpsievert/vdiffr@diffObj')"
89+
RUN R -e "devtools::install_github('lionel-/vdiffr#48')"
9090
RUN R -e "devtools::install_github('brodieG/diffobj@development')"
9191

9292
# switch on visual testing

tests/testthat/helper-vdiffr.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (enable_vdiffr) {
2020
}
2121

2222
# define logic for writing svg in vdiffr
23-
write_svg.plotly <- function(p, file, title, user_fonts = NULL) {
23+
write_plotly_svg <- function(p, file, title) {
2424
# before exporting, specify trace[i].uid so resulting svg is deterministic
2525
# https://github.com/plotly/orca/issues/133
2626
p <- plotly_build(p)
@@ -58,7 +58,7 @@ expect_doppelganger <- function(p, name, ...) {
5858
# otherwise comparing svg produces false positives
5959
set.seed(555)
6060
if (ggplot2::is.ggplot(p)) p <- ggplotly(p)
61-
vdiffr::expect_doppelganger(name, p, ...)
61+
vdiffr::expect_doppelganger(name, p, ..., writer = write_plotly_svg)
6262
} else {
6363
invisible(NULL)
6464
}

0 commit comments

Comments
 (0)