Skip to content

Commit 8a8923b

Browse files
committed
Capture output of function call in test
1 parent 9bb9b60 commit 8a8923b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/testthat/test_plots.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ test_that("Forest plot 1 to many", {
7474

7575
test_that("Forest plot 1 to many test 2", {
7676
res$pval<-formatC(res$pval, format = "e", digits = 2)
77-
expect_warning(p9 <- forest_plot_1_to_many(
77+
expect_warning(p9 <- utils::capture.output(forest_plot_1_to_many(
7878
res,
7979
b = "b",
8080
se = "se",
@@ -94,7 +94,7 @@ test_that("Forest plot 1 to many test 2", {
9494
addcols = c("nsnp", "pval"),
9595
addcol_widths = c(1.0, 1.0),
9696
addcol_titles = c("No. SNPs", "P-val")
97-
), regexp = "Removed 6 rows")
97+
), regexp = "Removed 6 rows"))
9898
})
9999

100100
test_that("Forest plot 1 to many test 3 - with subcategory in by argument", {

0 commit comments

Comments
 (0)