local_test_setup: Testing utilities

View source: R/testing.R

local_test_setupR Documentation

Testing utilities

Description

Similar to the local_() family from {withr}, this function creates a temporary directory and optionally initiates git and pre-commit in it.

Usage

local_test_setup(
  git = TRUE,
  use_precommit = FALSE,
  package = FALSE,
  quiet = TRUE,
  autoupdate = FALSE,
  ...,
  .local_envir = parent.frame()
)

Arguments

git

Whether or not to init git in the local directory.

use_precommit

Whether or not to use_precommit().

autoupdate

Whether or not to run autoupdate() as part of this fixture.

.local_envir

⁠[environment]⁠
The environment to use for scoping.


precommit documentation built on Sept. 11, 2024, 7:07 p.m.