Skip to content

Commit

Permalink
skip tests that require pandoc to pass under solaris
Browse files Browse the repository at this point in the history
  • Loading branch information
javierluraschi committed May 29, 2018
1 parent 9d0494e commit 743e6a8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: r2d3
Type: Package
Title: Interface to 'D3' Visualizations
Version: 0.2.0
Version: 0.2.1
Authors@R: c(
person("Javier", "Luraschi", email = "[email protected]", role = c("aut", "cre")),
person("JJ", "Allaire", role = c("aut")),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# r2d3 0.2.1

- Skip tests that require pandoc to support CRAN's solaris environment.
- Fix diagnostics message for dependencies with incorrect paths.

# r2d3 0.2.0

- Translate R objects into D3 friendly data structures
Expand Down
5 changes: 5 additions & 0 deletions R/publish.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
#' viz <- r2d3(data=c(0.3, 0.6, 0.8, 0.95, 0.40, 0.20), script = "barchart.js")
#' save_d3_html(viz, file = tempfile(fileext = ".html"))
#'
#' @details
#'
#' Using \code{selfcontained} set to \code{TRUE} requires \href{http://pandoc.org}{pandoc}
#' to be installed.
#'
#' @seealso [save_d3_png()]
#'
#' @export
Expand Down
4 changes: 4 additions & 0 deletions man/save_d3_html.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/testthat/test-knit.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ context("knit")
source("utils.R")

test_succeeds("r2d3 can knit visualizations", {
if (!rmarkdown::pandoc_available())
skip("rmarkdown requires pandoc")

output <- tempfile(fileext = ".html")
rmarkdown::render("barchart.Rmd", output_file = output)
})
3 changes: 3 additions & 0 deletions tests/testthat/test-save.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ context("save")
source("utils.R")

test_that("d3 visualizations can be saved as html", {
if (!rmarkdown::pandoc_available())
skip("selfcontained htmlwidgets require pandoc")

d3 <- r2d3(data=c(0.3, 0.6, 0.8, 0.95, 0.40, 0.20), script = "barchart.js")
tmp <- tempfile(fileext = ".html")
save_d3_html(d3, tmp)
Expand Down

0 comments on commit 743e6a8

Please sign in to comment.