Skip to content

Commit

Permalink
Add test to check if input is a rse
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Eagles <[email protected]>
  • Loading branch information
HediaTnani and Nick-Eagles committed Jan 16, 2024
1 parent 497e176 commit 839192f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/testthat/test-getDegTx.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,11 @@ test_that("getDegTx works with original and altered row names", {
# Test for assayname not in assayNames
test_that("getDegTx throws an error when assayname is not in assayNames", {
expect_error(getDegTx(covComb_tx_deg, assayname = "not_in_assayNames"), "'not_in_assayNames' is not in assayNames\\(rse_tx\\).")
})
})

# Test for input is an rse object
test_that("getDegTx throws an error when input is not a RangedSummarizedExperiment object", {
qsv <- list(x = matrix(seq_len(9), ncol = 3))
expect_error(getDegTx(qsv, assayname = "tpm"), "'rse_tx' must be a RangedSummarizedExperiment object.")
})

0 comments on commit 839192f

Please sign in to comment.