Skip to content

Commit

Permalink
Add tests for mice plotting functions
Browse files Browse the repository at this point in the history
  • Loading branch information
hanneoberman committed Mar 14, 2022
1 parent e494cdc commit 56f7dc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/testthat/test-old_friends.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
test_that("set of old friends functions generate plot", {
imp <- mice::mice(mice::nhanes, printFlag = FALSE)
expect_s3_class(bwplot(imp), "trellis")
expect_s3_class(densityplot(imp), "trellis")
expect_s3_class(stripplot(imp), "trellis")
expect_s3_class(xyplot(imp, bmi~age), "trellis")
})

test_that("set of old friends functions generate message", {
imp <- mice::mice(mice::nhanes, printFlag = FALSE)
expect_message(bwplot(imp))
expect_message(densityplot(imp))
expect_message(stripplot(imp))
expect_message(xyplot(imp, bmi~age))
})
File renamed without changes.

0 comments on commit 56f7dc9

Please sign in to comment.