file_coverage

0th

Percentile

Calculate test coverage for sets of files

The files in source_files are first sourced into a new environment to define functions to be checked. Then they are instrumented to track coverage and the files in test_files are sourced.

Usage
file_coverage(source_files, test_files, line_exclusions = NULL,
  function_exclusions = NULL, parent_env = parent.frame())
Arguments
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.

Aliases
  • file_coverage
Documentation reproduced from package covr, version 3.2.1, License: GPL-3

Community examples

Looks like there are no examples yet.