R/has-tests.R

Defines functions has_tests

Documented in has_tests

#' Was devtools installed with tests?
#'
#' @keywords internal
#' @export
has_tests <- function() {
  test_path <- tryCatch(
    path_package("devtools", "tests"),
    error = function(e) NULL
  )

  !is.null(test_path)
}
r-lib/devtools documentation built on Feb. 17, 2024, 5:32 p.m.