tests/testthat/test-homework-1-function.R

test_that("The num_na function works", {
  expect_equal(num_na(c(1,2,NA,4)), 1)
})

test_that("The status function works", {
  expect_equal(status("Progressive disease"), "Disease")
})

test_that("The status function works", {
  expect_equal(status("Complete response"), "Response")
})

test_that("The status function works", {
  expect_equal(status("Complete"), "ERROR")
})
Violettttta/bis620 documentation built on Oct. 9, 2022, 10:28 a.m.