From e6ef946fcb616a0b5735d90e3e5362638683994f Mon Sep 17 00:00:00 2001 From: Jack Leary Date: Sat, 5 Oct 2024 14:40:20 -0400 Subject: [PATCH] expanded test coverage -- related to #235 --- tests/testthat/test_scLANE.R | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/testthat/test_scLANE.R b/tests/testthat/test_scLANE.R index 45f6074..fb6c766 100644 --- a/tests/testthat/test_scLANE.R +++ b/tests/testthat/test_scLANE.R @@ -54,6 +54,8 @@ withr::with_output_sink(tempfile(), { id.vec = sim_data$subject, n.cores = 2L, verbose = FALSE) + # S3 summary method + scLANE_summary <- summary(glm_gene_stats) # get results tables overall glm_test_results <- getResultsDE(glm_gene_stats, n.cores = 1L) gee_test_results <- getResultsDE(gee_gene_stats) @@ -308,6 +310,11 @@ test_that("testDynamic() output", { expect_gt(sum(purrr::map_lgl(glmm_gene_stats, \(x) x$Lineage_A$Model_Status == "MARGE model OK, null model OK")), 0) }) +test_that("summary() output", { + expect_s3_class(scLANE_summary, "summary.scLANE") + expect_length(scLANE_summary, 5) +}) + test_that("getResultsDE() output", { expect_s3_class(glm_test_results, "data.frame") expect_s3_class(gee_test_results, "data.frame")