| Title: | 'testhat' Results to Bookdown |
|---|---|
| Description: | Turn your 'testthat' results a Bookdown. |
| Authors: | Colin Fay [cre, aut] (ORCID: <https://orcid.org/0000-0001-7343-1846>), Sébastien Rochette [aut] (ORCID: <https://orcid.org/0000-0002-1565-9313>), ThinkR [cph], Institut de Recherches Internationales Servier [spn] |
| Maintainer: | Colin Fay <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.2.9000 |
| Built: | 2026-05-30 09:12:33 UTC |
| Source: | https://github.com/ThinkR-open/testdown |
This function turns the results of testthat into a bookdown. Each chapter is a context. The first page gives a summary of all the tests.
test_down( project_name = NULL, author = NULL, pkg = here::here(), environment = here::here(), book_path = "tests/testdown", with_help = TRUE, open = interactive() )test_down( project_name = NULL, author = NULL, pkg = here::here(), environment = here::here(), book_path = "tests/testdown", with_help = TRUE, open = interactive() )
project_name |
The name you want to give to the project. The default is 'NULL', which will be then be converted to 'basename(here::here())'. |
author |
The author of the test report. Default is set to 'NULL', then it will be skipped. |
pkg |
The path to the package to document. Default is 'here::here()'. |
environment |
A name for the testing environment. Default is 'here::here()'. |
book_path |
The path to the bookdown output. Default is '"tests/testdown"'. |
with_help |
Should the help appendix be added? Default is 'TRUE'. |
open |
Should the bookdown be opened once compiled? Default is 'interactive()'. |
Run a test_down example
test_down_example( project_name = NULL, author = NULL, environment = here::here(), pkg = system.file("fakepkg", package = "testdown"), book_path = "tests/testdown", with_help = TRUE, open = interactive() )test_down_example( project_name = NULL, author = NULL, environment = here::here(), pkg = system.file("fakepkg", package = "testdown"), book_path = "tests/testdown", with_help = TRUE, open = interactive() )
project_name |
The name you want to give to the project. The default is 'NULL', which will be then be converted to 'basename(here::here())'. |
author |
The author of the test report. Default is set to 'NULL', then it will be skipped. |
environment |
A name for the testing environment. Default is 'here::here()'. |
pkg |
The path to the package to document. Default is 'here::here()'. |
book_path |
The path to the bookdown output. Default is '"tests/testdown"'. |
with_help |
Should the help appendix be added? Default is 'TRUE'. |
open |
Should the bookdown be opened once compiled? Default is 'interactive()'. |
Path to the report
if (interactive()){ dir_book <- tempfile() dir.create(dir_book) test_down_example(book_path = dir_book) }if (interactive()){ dir_book <- tempfile() dir.create(dir_book) test_down_example(book_path = dir_book) }