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.

autoupdate

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

.local_envir

[environment]
The environment to use for scoping.

use_precommmit

Whether or not to use_precommit().


precommit documentation built on July 2, 2022, 1:06 a.m.