Snitkin-Lab-Umich / UnitTestsAndFunctionChecks

UnitTestsAndFunctionChecks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

UnitTestsAndFunctionChecks


Languages

Language:R 100.0%