R/verify_testthat.R

Defines functions verify_testthat_used

verify_testthat_used <- function() {
  if (!dir.exists("tests") || 
      !file.exists(file.path("tests", "testthat.R")) ||
      !dir.exists(file.path("tests", "testthat"))) {
    stop("testthat is not currently used, please set it up, e.g. by usethis::use_testthat()")
    return(FALSE)
  }
  
  return(TRUE)
}

Try the roxytest package in your browser

Any scripts or data that you put into this service are public.

roxytest documentation built on Jan. 11, 2023, 5:14 p.m.