These functions extract tests, run tests and create a report of the coverage for a single file.
file_coverage(file = rstudioapi::getSourceEditorContext()$path,
pkg = ".", ...)covr_file(coverage = file_coverage(), report.file = NULL,
show.report = interactive())
The file to extract test from and compute coverage.
The package file is associated with.
Arguments passed on to covr::file_coverage
Character vector of source files with function definitions to measure coverage
Character vector of test files with code to test the functions
a named list of files with the lines to exclude from each file.
a vector of regular expressions matching function
names to exclude. Example print\\. to match print methods.
The parent environment to use when sourcing the files.
Coverage returned from file_coverage().
Where to save the HTML report.
if the HTML report should be displayed.
file_coverage: Extract tests and compute the coverage for the given file.
covr_file: Create a report for a single