Skip to content

Commit

Permalink
Add test for expected error
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam committed Aug 22, 2024
1 parent 5c7f794 commit b913f51
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/testthat/tests-sim.r
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ test_that("Errors are thrown", {
),
"If `tf` is specified, `serial` must be specified too."
)
expect_error(
chain_sim(
n = 10,
offspring = "nbinom",
stat = "size",
mu = 0,
size = 0
),
"must have at least one non-zero parameter"
)
})

test_that("Chains can be simulated", {
Expand Down

0 comments on commit b913f51

Please sign in to comment.