test_description {covtracer}R Documentation

Parse a test description from the calling expression

Description

In the general case, a simple indicator of the source file and line number is used as a test description. There are some special cases where more descriptive information can be extracted:

Usage

test_description(x)

Arguments

x

a unit test call stack or expression.

Details

testthat

If the test used test_that, then the description (desc parameter) is extracted and evaluated if need be to produce a descriptive string. Nested calls to test_that currently return the outermost test description, although this behavior is subject to change.

Value

A string that describes the test. If possible, this will be a written description of the test, but will fall back to the test call as a string in cases where no written description can be determined.


[Package covtracer version 0.0.1 Index]