README.md

Unit Tests and Function Checks

This repository is to help lab members learn about input validation (function checks) and unit tests. The code in this repository was used for a demonstration during lab meeting.

Note:

To add unit test functionality to your R package run

usethis::use_testthat()

This command will generate a subdirectory called tests/testthat/ where you will write your test files.

For unit testing you can create as many files as you like: one for each function, one for each lib file, or one long file. Make sure your test files are named test_*.R



Snitkin-Lab-Umich/UnitTestsAndFunctionChecks documentation built on May 19, 2020, 10:50 a.m.