An open API service indexing awesome lists of open source software.

https://github.com/mjfrigaard/utap

Unit testing app-package = Package/app for demoing shiny utility function unit testing with testthat
https://github.com/mjfrigaard/utap

Last synced: 4 months ago
JSON representation

Unit testing app-package = Package/app for demoing shiny utility function unit testing with testthat

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# `utap`

The goal of `utap` is to demonstrate how to perform unit tests for shiny utility functions with [`testthat`](https://testthat.r-lib.org/).

## Installation

You don't want to install this package, but you might want to download it as an example (or read through [this post](https://mjfrigaard.github.io/posts/test-shiny-p1/) to learn about it's contents).

# R files

```{r}
#| echo: false
fs::dir_tree("R/")
```

# Unit tests

```{r}
#| echo: false
fs::dir_tree("tests/testthat/", regexp = "^tests/testthat/test-")
```

# Unit test results

```{verbatim}
#| eval: false
==> devtools::test()

ℹ Testing utap
✔ | F W S OK | Context
✔ | 29 | pull_binary_cols
✔ | 4 | pull_cat_cols
✔ | 20 | pull_facet_cols
✔ | 5 | pull_numeric_cols
✔ | 25 | select_by_class
✔ | 3 | utils

══ Results ═══════════════════
Duration: 2.0 s

[ FAIL 0 | WARN 0 | SKIP 0 | PASS 86 ]
```