From ad8599b26426a50c384606e3c9357cab8a4bdcdc Mon Sep 17 00:00:00 2001 From: Gavin Simpson Date: Tue, 17 Oct 2023 11:11:49 +0200 Subject: [PATCH] add some basic tests just to run fitted_values on some LSS and scam models --- tests/testthat/test-fitted-values.R | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/testthat/test-fitted-values.R b/tests/testthat/test-fitted-values.R index eae02d5e7..c7a216829 100644 --- a/tests/testthat/test-fitted-values.R +++ b/tests/testthat/test-fitted-values.R @@ -78,3 +78,15 @@ test_that("fitted_values() works for an ocat GAM", { expect_s3_class(fv, c("tbl_df", "tbl", "data.frame")) expect_identical(nrow(new_df), nrow(fv)) }) + +test_that("fitted values works for a univariate scam model", { + expect_silent(fv <- fitted_values(m_scam)) +}) + +test_that("fitted values works for a ziplss model", { + expect_silent(fv <- fitted_values(m_ziplss)) +}) + +test_that("fitted values works for a gaulss model", { + expect_silent(fv <- fitted_values(m_gaulss)) +})