Skip to content

Commit dceab5a

Browse files
committed
Add tests
1 parent 769ccdf commit dceab5a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tests/testthat/test-kfold_cv.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ if (.if_run_ex_eval_mod()) {
2525
c(".row", ".draw", "pred", "fold_id")
2626
)
2727
expect_equal(dim(cv_results$d_sim), c(100 * 1000, 4))
28+
29+
out <- cli::cli_fmt({
30+
print(cv_results)
31+
})
32+
expect_true(any(grepl("k-fold Cross-Validation for ermod object", out)))
2833
})
2934
}
3035
}

tests/testthat/test-plot_ermod.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ test_that("plot_er with groups", {
161161
options_orig_data = list(var_group = "Dose_mg", add_boxplot = TRUE)
162162
) |>
163163
expect_silent()
164+
165+
plot_er(ermod_bin,
166+
show_orig_data = TRUE,
167+
options_orig_data = list(add_boxplot = TRUE)
168+
) |>
169+
expect_silent()
164170
}
165171
})
166172

0 commit comments

Comments
 (0)