If testthat::testthat-package is available, run the unit tests and display the results.

unittest(ns, standalone = TRUE, reporter = "progress")

Arguments

ns

namespace (package) to test

standalone

if TRUE, appropriate testthat::Reporters are used, if FALSE the exectution assumes reporters are started already.

reporter

testthat::Reporter to be used.

Value

Invisibly returns a data.frame with the test results

Author

Claudia Beleites

Examples

unittest("hySpc.testthat")
#>  | F W S  OK | Context
#> 
#> ⠏ |         0 | get_test                                                        
#>  |         1 | get_test
#> 
#> ⠏ |         0 | test_fun                                                        
#>  |         2 | test_fun
#> 
#> ⠏ |         0 | test<-                                                          
#>  |         1 | test<-
#> 
#> ⠏ |         0 | unittest                                                        
#> ══ Results ═════════════════════════════════════════════════════════════════════
#> Duration: 0.2 s
#> 
#> [ FAIL 0 | WARN 0 | SKIP 0 | PASS 6 ]