knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  eval = FALSE
)
library(datelife)
library(covr)

Coverage of tests

We are using the package covr. We set it up pn Travis, so everytime it tests coverage is calculated and shown very nicely in here. However, this takes time, because some tests take a looong time.

What I do to check coverage locally:

cov <- covr::package_coverage()
save(cov, file = "cov.RData")
# This last one will save the object on the root of the package.

It is important to add cov.RData to your .gitignore file, so the file is not version controlled.

You can load your object on any R environment you want (terminal, RStudio, R console)

load("~/pj_datelife/datelife/cov.RData")

Let's look at the object now

cov

If you are using RStudio, the following will print all the lines that are not covered in tests, and will allow you to navigate them interactively r emo::ji("star_struck")

covr::zero_coverage(cov)


phylotastic/datelife documentation built on June 9, 2024, 6:50 p.m.