diff --git a/tests/testthat/test-getDegTx.R b/tests/testthat/test-getDegTx.R index d4b86a0..abab9ab 100644 --- a/tests/testthat/test-getDegTx.R +++ b/tests/testthat/test-getDegTx.R @@ -37,9 +37,7 @@ test_that("At least one sig_transcript is in covComb_tx_deg rownames", { sig_transcripts <- select_transcripts("cell_component") expect_silent({ # Check if any of the sig_transcripts are in covComb_tx_deg rownames - if (!any(sig_transcripts %in% rownames(covComb_tx_deg))) { - stop("No sig_transcripts found in rownames(covComb_tx_deg)") - } + getDegTx(sig_transcripts = sig_transcripts) }) }) @@ -48,9 +46,8 @@ test_that("No sig_transcripts are in covComb_tx_deg rownames", { sig_transcripts <- c("gene4", "gene5", "gene6") # Example genes not in covComb_tx_deg expect_error({ # Check if any of the sig_transcripts are in covComb_tx_deg rownames - if (!any(sig_transcripts %in% rownames(covComb_tx_deg))) { - stop("No sig_transcripts found in rownames(covComb_tx_deg)") - } + getDegTx(sig_transcripts = sig_transcripts) + }, "No sig_transcripts found in rownames(covComb_tx_deg)") })