Skip to content

Commit d8e45b0

Browse files
committed
Add tests for MR-GRIP in scatter plot
1 parent c4f1b18 commit d8e45b0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/testthat/test_plots.R

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,17 @@ test_that("Scatter plot for default set of estimates", {
1717
expect_true(is.list(p2))
1818
expect_true(length(p2) == 1L)
1919
})
20+
21+
test_that("Scatter plot for mr_grip", {
22+
m3 <- mr(dat, method_list = "mr_grip")
23+
p3 <- mr_scatter_plot(m3, dat)
24+
expect_true(is.list(p3))
25+
expect_true(length(p3) == 1L)
26+
})
27+
28+
test_that("A second scatter plot for mr_grip", {
29+
m4 <- mr(dat2, method_list = "mr_grip")
30+
p4 <- mr_scatter_plot(m4, dat2)
31+
expect_true(is.list(p4))
32+
expect_true(length(p4) == 4L)
33+
})

0 commit comments

Comments
 (0)