test_down_example: Run a test_down example

View source: R/example.R

test_down_exampleR Documentation

Run a test_down example

Description

Run a test_down example

Usage

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()
)

Arguments

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()'.

Value

Path to the report

Examples

if (interactive()){
 dir_book <- tempfile()
 dir.create(dir_book)
 test_down_example(book_path = dir_book)
}

ThinkR-open/testdown documentation built on April 17, 2023, 3:21 a.m.