Skip to content

Commit

Permalink
fix tests and update print
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffanymtang committed Jan 7, 2025
1 parent 304bb19 commit 2591892
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions R/visualizer.R
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ Visualizer <- R6::R6Class(
cat(" Parameters: ")
cat(str(self$viz_params,
indent.str = " ", no.list = F))
cat(" Export Options: ")
cat(str(self$export_options,
indent.str = " ", no.list = F))
cat(" R Markdown Options: ")
cat(str(self$doc_options,
indent.str = " ", no.list = F))
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-visualizer.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ test_that("Visualizer initialization works properly", {
visualizer1i <- Visualizer$new(n = 100, func = func, viz_fun1)
visualizer1j <- Visualizer$new(n = 100, viz_fun1, "Visualizer")
visualizer1k <- Visualizer$new(viz_fun1, "Visualizer",
list(width = 8), doc_o = TRUE, n = 100)
.doc_options = list(width = 8),
doc_o = TRUE, n = 100)
visualizer1l <- Visualizer$new(viz_fun1, "Visualizer", n = 100, doc_o = TRUE)
visualizer1m <- Visualizer$new(viz_fun1, a = 5, "Visualizer",
list(width = 8), doc_o = TRUE)
.doc_options = list(width = 8), doc_o = TRUE)

# print statements
expect_snapshot_output(visualizer1)
Expand Down

0 comments on commit 2591892

Please sign in to comment.