---
title: "Tests and Coverage"
date: "`r format(Sys.time(), '%d %B, %Y %H:%M:%S')`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Tests and Coverage}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
eval = FALSE
)
```
- [Coverage](#coverage)
- [Unit Tests](#unit-tests)
This output is created by
[covrpage](https://github.com/yonicd/covrpage).
## Coverage
Coverage summary is created using the
[covr](https://github.com/r-lib/covr) package.
| Object | Coverage (%) |
| :---------------------------------- | :----------: |
| whereami | 36.49 |
| [R/counter.R](https://github.com/yonicd/whereami/blob/master/R/counter.R) | 7.89 |
| [R/print.R](https://github.com/yonicd/whereami/blob/master/R/print.R) | 41.38 |
| [R/whereami.R](https://github.com/yonicd/whereami/blob/master/R/whereami.R) | 50.00 |
| [R/zzz.R](https://github.com/yonicd/whereami/blob/master/R/zzz.R) | 50.00 |
| [R/thisfile.R](https://github.com/yonicd/whereami/blob/master/R/thisfile.R) | 51.22 |
| [R/breadcrumb.R](https://github.com/yonicd/whereami/blob/master/R/breadcrumb.R) | 68.18 |
| [R/utils.R](https://github.com/yonicd/whereami/blob/master/R/utils.R) | 100.00 |
## Unit Tests
Unit Test summary is created using the
[testthat](https://github.com/r-lib/testthat) package.
| file | n | time | error | failed | skipped | warning |
| :------------------------------------------ | -: | ----: | ----: | -----: | ------: | ------: |
| [test-counter.R](https://github.com/yonicd/whereami/blob/master/tests/testthat/test-counter.R) | 1 | 0.011 | 0 | 0 | 0 | 0 |
| [test-source.R](https://github.com/yonicd/whereami/blob/master/tests/testthat/test-source.R) | 3 | 0.064 | 0 | 0 | 0 | 0 |
| [test-thisfile.R](https://github.com/yonicd/whereami/blob/master/tests/testthat/test-thisfile.R) | 4 | 0.517 | 0 | 0 | 0 | 0 |
Show Detailed Test Results
| file | context | test | status | n | time |
| :-------------------------------------------------- | :-------------------- | :------------------------------ | :----- | -: | ----: |
| [test-counter.R](https://github.com/yonicd/whereami/blob/master/tests/testthat/test-counter.R#L7) | counter functionality | counter flow: no counter exists | PASS | 1 | 0.011 |
| [test-source.R](https://github.com/yonicd/whereami/blob/master/tests/testthat/test-source.R#L7) | source functionality | source calls: direct call | PASS | 1 | 0.012 |
| [test-source.R](https://github.com/yonicd/whereami/blob/master/tests/testthat/test-source.R#L11) | source functionality | source calls: path expand | PASS | 1 | 0.044 |
| [test-source.R](https://github.com/yonicd/whereami/blob/master/tests/testthat/test-source.R#L15) | source functionality | source calls: print | PASS | 1 | 0.008 |
| [test-thisfile.R](https://github.com/yonicd/whereami/blob/master/tests/testthat/test-thisfile.R#L9) | thisfile | thisfile works with source | PASS | 1 | 0.004 |
| [test-thisfile.R](https://github.com/yonicd/whereami/blob/master/tests/testthat/test-thisfile.R#L17) | thisfile | thisfile works with Rscript | PASS | 1 | 0.251 |
| [test-thisfile.R](https://github.com/yonicd/whereami/blob/master/tests/testthat/test-thisfile.R#L25) | thisfile | thisfile works with R | PASS | 1 | 0.249 |
| [test-thisfile.R](https://github.com/yonicd/whereami/blob/master/tests/testthat/test-thisfile.R#L32_L36) | thisfile | thisfile works with knitr | PASS | 1 | 0.013 |
Session Info
| Field | Value | |
| :------- | :---------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Version | R version 4.2.2 (2022-10-31) | |
| Platform | x86\_64-pc-linux-gnu (64-bit) | ![](https://github.com/metrumresearchgroup/covrpage/blob/actions/inst/logo/gh.png?raw=true) |
| Running | Ubuntu 22.04.1 LTS | |
| Language | C | |
| Timezone | UTC | |
| Package | Version |
| :------- | :------ |
| testthat | 3.1.6 |
| covr | 3.6.1 |
| covrpage | 0.1 |