Learn R Programming

SpaDES.core (version 2.0.5)

moduleCoverage: Calculate module coverage of unit tests

Description

Calculate the test coverage by unit tests for the module and its functions.

Usage

moduleCoverage(mod, modulePath = "..")

Value

Return a list of two coverage objects and two data.table objects. The two coverage objects are named moduleCoverage and functionCoverage. The moduleCoverage object contains the percent value of unit test coverage for the module. The functionCoverage object contains percentage values for unit test coverage for each function defined in the module. Please use covr::report() to view the coverage information. Two data.tables give the information of all the tested and untested functions in the module.

Arguments

mod

Character string. The module's name. Default is basename(getwd())

modulePath

Character string. The path to the module directory (default is "..", i.e., one level up from working directory).

Author

Yong Luo

See Also

newModule().