From 7c7bd5f70a5ca344dc7c5d1425079e68e89dccaf Mon Sep 17 00:00:00 2001 From: HediaTnani Date: Tue, 16 Jan 2024 11:43:37 -0500 Subject: [PATCH] Combine the unit test to check if output is a matrix --- tests/testthat/test-get_qsvs.R | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/testthat/test-get_qsvs.R b/tests/testthat/test-get_qsvs.R index e9f39ab..c990e36 100644 --- a/tests/testthat/test-get_qsvs.R +++ b/tests/testthat/test-get_qsvs.R @@ -11,11 +11,7 @@ test_that("length of qsv rownames is the same as number of samples", { }) test_that("output is a matrix", { - expect_equal(class(get_qsvs(qsv, k))[1], "matrix") -}) - -test_that("output is an array", { - expect_equal(class(get_qsvs(qsv, k))[2], "array") + expect_equal(class(get_qsvs(qsv, k)), c("matrix", "array")) }) test_that("k is lower than 0 throws an error", {