Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffanymtang committed Jan 7, 2025
1 parent 2591892 commit c931e57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions tests/testthat/_snaps/visualizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-visualizer.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit c931e57

Please sign in to comment.