diff --git a/NEWS.md b/NEWS.md index 6062601..3eda8ec 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ + Minor bug fixes. + Improved matrix inversion through judicious usage of C++. ++ Added S3 method `summary.scLANE()` to be used on output from `testDynamic()`. # Changes in version 0.8.3 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")