covr-single: Single File Coverage

Description Usage Arguments Functions

Description

These functions extract tests, run tests and create a report of the coverage for a single file.

Usage

1
2
3
4
5
file_coverage(file = rstudioapi::getSourceEditorContext()$path,
  pkg = ".", ...)

covr_file(coverage = file_coverage(), report.file = NULL,
  show.report = interactive())

Arguments

file

The file to extract test from and compute coverage.

pkg

The package file is associated with.

...

Arguments passed on to covr::file_coverage

source_files

Character vector of source files with function definitions to measure coverage

test_files

Character vector of test files with code to test the functions

line_exclusions

a named list of files with the lines to exclude from each file.

function_exclusions

a vector of regular expressions matching function names to exclude. Example print\\. to match print methods.

parent_env

The parent environment to use when sourcing the files.

coverage

Coverage returned from file_coverage().

report.file

Where to save the HTML report.

show.report

if the HTML report should be displayed.

Functions


testextra documentation built on Dec. 18, 2019, 9:38 a.m.