testthat icon indicating copy to clipboard operation
testthat copied to clipboard

Add `expect_snapshot_message()`

Open dpprdan opened this issue 3 years ago • 0 comments

I think a expect_snapshot_message() should be added

  1. for consistency. There are expect_snapshot_error() and expect_snapshot_warning() (#1536).
  2. because "sometimes you just want to capture the ~~output or errors~~ message in which you might want to use ~~expect_snapshot_output() or expect_snapshot_error()~~ expect_snapshot_message()." quote from https://github.com/r-lib/testthat/blob/426eb523f6772c76175d6e8d7ca04355b1ee7ad5/vignettes/snapshotting.Rmd#L216
  3. one might want to use the explicit class argument (cf. https://github.com/r-lib/testthat/pull/1616#issuecomment-1116208903)

This is futile of course, should expect_snapshot_error() be discouraged/deprecated (#1548, #1616)

dpprdan avatar Jun 03 '22 16:06 dpprdan