Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

snapshot_accept

Snapshot management


Description

  • snapshot_accept() accepts all modified snapshots.

  • snapshot_review() opens a Shiny app that shows a visual diff of each modified snapshot. This is particularly useful for whole file snapshots created by expect_snapshot_file().

Usage

snapshot_accept(files = NULL, path = "tests/testthat")

snapshot_review(files = NULL, path = "tests/testthat")

Arguments

files

Optionally, filter affects to snapshots from specified test files. Can be full path to test (tests/testthat/test-foo.R), file name (test-foo.R), or test name (foo).

path

Path to tests.


testthat

Unit Testing for R

v3.0.2
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre], RStudio [cph, fnd], R Core team [ctb] (Implementation of utils::recover())
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.