Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sempwn/testthat-example
An example file and structure layout for performing testing in R
https://github.com/sempwn/testthat-example
Last synced: about 1 month ago
JSON representation
An example file and structure layout for performing testing in R
- Host: GitHub
- URL: https://github.com/sempwn/testthat-example
- Owner: sempwn
- License: mit
- Created: 2020-03-06T00:30:35.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-06T22:26:39.000Z (almost 5 years ago)
- Last Synced: 2024-10-12T01:23:01.770Z (3 months ago)
- Language: HTML
- Size: 12 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# testthat-example
An example file and structure layout for performing testing in R
## How to run tests
Open `RStudio` and then run the following command from the folder directory:
```r
testthat::test_dir("tests")
```This should produce the following result:
```console
/ | OK F W S | Context
/ | 0 | test_process_dataColumn 'date' violates assertion 'is_uniq' 2 times
verb redux_fn predicate column index value
1 assert NA is_uniq date 20 2020-02-20
2 assert NA is_uniq date 21 2020-02-20/ | 2 | test_process_dataColumn 'lab_test' violates assertion 'within_bounds(0, Inf)' 1 time
verb redux_fn predicate column index value
1 assert NA within_bounds(0, Inf) lab_test 21 -1/ | 3 | test_process_data [0.2 s]
== Results =====================================================================
Duration: 0.4 sOK: 3
Failed: 0
Warnings: 0
Skipped: 0
```