test_srcrefs_df | R Documentation |
Extract unit test srcref
s from a
coverage
object. A test name will be
derived from the test source code, preferrably from a written annotation, but
otherwise falling back to using a code snippet. srcrefs
are unique for
each expression executed within a testing suite.
test_srcrefs_df(x)
x |
A |
A data.frame
of test srcrefs
extracted from a
coverage
object. Contains one record for each srcref
with
variables:
A character
test description. For testthat
tests, the
desc
parameter will be used, otherwise a snippet of code will be
used for the test name
A srcref
object describing the location of the test
A character
indicating the structure of the test. One of
"testthat"
, "call"
or NULL
srcrefs test_trace_mapping
Other srcrefs_df:
pkg_srcrefs_df()
,
trace_srcrefs_df()
options(covr.record_tests = TRUE)
pkg_path <- system.file("examplepkg", package = "covtracer")
cov <- covr::package_coverage(pkg_path)
test_srcrefs_df(cov)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.