From c532d6975cff881f8000c2f3c39f2a94810a4a90 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 30 Sep 2023 09:07:20 +0200 Subject: [PATCH] fix test --- tests/testthat/test-p_significance.R | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/testthat/test-p_significance.R b/tests/testthat/test-p_significance.R index 8463a06db..69c7bab25 100644 --- a/tests/testthat/test-p_significance.R +++ b/tests/testthat/test-p_significance.R @@ -6,12 +6,21 @@ test_that("p_significance", { expect_equal(as.numeric(ps), 0.816, tolerance = 0.1) expect_s3_class(ps, "p_significance") expect_s3_class(ps, "data.frame") - expect_equal(dim(ps), c(1, 1)) - expect_output(print(ps), "Practical Significance \\(threshold: 0.10\\): 0.82") + expect_identical(dim(ps), c(1L, 1L)) + expect_output( + print(ps), + c( + "Practical Significance (threshold: 0.10)", + "", + "Parameter | ps", + "----------------", + "Posterior | 0.82" + ) + ) x <- data.frame(replicate(4, rnorm(100))) pd <- p_significance(x) - expect_equal(dim(pd), c(4, 2)) + expect_identical(dim(pd), c(4L, 2L)) }) test_that("stanreg", {