Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Aug 22, 2024
1 parent 205bb09 commit fe8c1f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test-base.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ test_that("model_parameters.data.frame as draws", {
expect_identical(colnames(mp), c("Parameter", "Median", "CI_low", "CI_high", "pd"))
})

test_that("model_parameters.data.frame as draws, exponentiate", {
data(iris)
mp <- suppressWarnings(model_parameters(iris[1:4], as_draws = TRUE, exponentiate = TRUE))
expect_equal(mp$Median, c(330.29956, 20.08554, 77.47846, 3.6693), tolerance = 1e-2, ignore_attr = TRUE)
})

# require model input
test_that("model_parameters", {
expect_error(model_parameters())
Expand Down

0 comments on commit fe8c1f7

Please sign in to comment.