Debian Codegraph @

man/runTests.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/test.R
3 \name{runTests}
4 \alias{runTests}
5 \title{Runs the tests associated with this Shiny app}
6 \usage{
7 runTests(appDir = ".", filter = NULL, assert = TRUE, envir = globalenv())
8 }
9 \arguments{
10 \item{appDir}{The base directory for the application.}
11
12 \item{filter}{If not \code{NULL}, only tests with file names matching this regular
13 expression will be executed. Matching is performed on the file name
14 including the extension.}
15
16 \item{assert}{Logical value which determines if an error should be thrown if any error is captured.}
17
18 \item{envir}{Parent testing environment in which to base the individual testing environments.}
19 }
20 \value{
21 A data frame classed with the supplemental class \code{"shiny_runtests"}.
22 The data frame has the following columns:\tabular{lll}{
23 \strong{Name} \tab \strong{Type} \tab \strong{Meaning} \cr
24 \code{file} \tab \code{character(1)} \tab File name of the runner script in \verb{tests/} that was sourced. \cr
25 \code{pass} \tab \code{logical(1)} \tab Whether or not the runner script signaled an error when sourced. \cr
26 \code{result} \tab any or \code{NA} \tab The return value of the runner \cr
27 }
28 }
29 \description{
30 Sources the \code{.R} files in the top-level of \verb{tests/} much like \verb{R CMD check}.
31 These files are typically simple runners for tests nested in other
32 directories under \verb{tests/}.
33 }
34 \details{
35 Historically, \href{https://rstudio.github.io/shinytest/}{shinytest}
36 recommended placing tests at the top-level of the \verb{tests/} directory.
37 This older folder structure is not supported by runTests.
38 Please see \code{\link[=shinyAppTemplate]{shinyAppTemplate()}} for more details.
39 }