From c931e574ebaab3af45945fc398ae498d2a20aa61 Mon Sep 17 00:00:00 2001 From: Tiffany Tang Date: Mon, 6 Jan 2025 22:35:40 -0600 Subject: [PATCH] update tests --- tests/testthat/_snaps/visualizer.md | 4 ++++ tests/testthat/test-visualizer.R | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/testthat/_snaps/visualizer.md b/tests/testthat/_snaps/visualizer.md index 1f125373..e8998283 100644 --- a/tests/testthat/_snaps/visualizer.md +++ b/tests/testthat/_snaps/visualizer.md @@ -3,6 +3,7 @@ Visualizer Name: NULL Function: function (x, ...) Parameters: list() + Export Options: list() R Markdown Options: List of 2 $ height: num 6 $ width : num 10 @@ -13,6 +14,7 @@ Visualizer Name: Visualizer Function: function (x, ...) Parameters: list() + Export Options: list() R Markdown Options: List of 2 $ height: num 6 $ width : num 10 @@ -23,6 +25,7 @@ Visualizer Name: NULL Function: function (x, ...) Parameters: list() + Export Options: list() R Markdown Options: List of 2 $ height: num 8 $ width : num 10 @@ -37,6 +40,7 @@ $ b: int [1:5] 1 2 3 4 5 $ c:'data.frame': 2 obs. of 1 variable: ..$ d: int [1:2] 1 2 + Export Options: list() R Markdown Options: List of 2 $ height: num 6 $ width : num 10 diff --git a/tests/testthat/test-visualizer.R b/tests/testthat/test-visualizer.R index e4c7ba26..2d668216 100644 --- a/tests/testthat/test-visualizer.R +++ b/tests/testthat/test-visualizer.R @@ -111,10 +111,10 @@ test_that("Visualizer initialization works properly", { visualizer2i <- create_visualizer(n = 100, func = func, viz_fun1) visualizer2j <- create_visualizer(n = 100, viz_fun1, "Visualizer") visualizer2k <- create_visualizer(viz_fun1, "Visualizer", - list(width = 8), doc_o = TRUE, n = 100) + .doc_options = list(width = 8), doc_o = TRUE, n = 100) visualizer2l <- create_visualizer(viz_fun1, "Visualizer", n = 100, doc_o = TRUE) visualizer2m <- create_visualizer(viz_fun1, a = 5, "Visualizer", - list(width = 8), doc_o = TRUE) + .doc_options = list(width = 8), doc_o = TRUE) expect_error(create_visualizer()) expect_error(create_visualizer(.name = "Visualizer"))