File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -11,20 +11,21 @@ imageServer <- if (visual_testing) {
1111
1212
1313expect_doppelganger <- function (p , name , ... ) {
14+ testthat :: local_edition(3 )
15+
16+ name <- str_standardise(name )
17+ file <- paste0(name , " .svg" )
18+ path <- tempfile(file , fileext = " .svg" )
19+ testthat :: announce_snapshot_file(path , name = file )
1420
1521 if (! visual_testing ) {
1622 return (invisible (NULL ))
1723 }
1824
19- testthat :: local_edition(3 )
20-
2125 # some plots have random characteristics, so make sure we always have the same seed,
2226 # otherwise comparing svg produces false positives
2327 set.seed(555 )
2428
25- name <- str_standardise(name )
26- file <- paste0(name , " .svg" )
27- path <- tempfile(file , fileext = " .svg" )
2829 write_plotly_svg(p , path )
2930 testthat :: expect_snapshot_file(path = path , name = file , cran = FALSE )
3031}
You can’t perform that action at this time.
0 commit comments