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
- Host: GitHub
- URL: https://github.com/mjfrigaard/utap
- Owner: mjfrigaard
- License: other
- Created: 2023-04-26T04:04:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-23T11:41:44.000Z (about 1 year ago)
- Last Synced: 2024-08-13T07:11:07.942Z (8 months ago)
- Language: R
- Homepage: https://mjfrigaard.github.io/utap/
- Size: 5.38 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - mjfrigaard/utap - Unit testing app-package = Package/app for demoing shiny utility function unit testing with testthat (R)
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 ]
```