From 2591892fea8f3d7a0905d2d305f66b4911dbb515 Mon Sep 17 00:00:00 2001 From: Tiffany Tang Date: Mon, 6 Jan 2025 21:59:49 -0600 Subject: [PATCH] fix tests and update print --- R/visualizer.R | 3 +++ tests/testthat/test-visualizer.R | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/R/visualizer.R b/R/visualizer.R index 4b64b0c6..7fa1661b 100644 --- a/R/visualizer.R +++ b/R/visualizer.R @@ -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)) diff --git a/tests/testthat/test-visualizer.R b/tests/testthat/test-visualizer.R index e0a673c0..e4c7ba26 100644 --- a/tests/testthat/test-visualizer.R +++ b/tests/testthat/test-visualizer.R @@ -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)