testthat
testthat copied to clipboard
Add `expect_snapshot_message()`
I think a expect_snapshot_message() should be added
- for consistency. There are
expect_snapshot_error()andexpect_snapshot_warning()(#1536). - 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 - one might want to use the explicit
classargument (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)