tests/testthat/test-utils.R

test_that("test extracting patient_id from sample_id works", {

  expect_no_error(extract_patient_id(gnomeR::mutations[1:10,]$sampleId))

})

test_that("test error thrown when non IMPACT ID", {

  sample_id =  c("P-0000071-T01-IM3", "XX", "P-0000073-T03-IM5")
  expect_error(extract_patient_id(sample_id))

})
MSKCC-Epi-Bio/gnomeR documentation built on March 28, 2024, 2:42 a.m.