tests/testthat/helper-targetedevent.R

expect_targeted_listener <- function(listener, call, t, target) {
  mock_args <- mockery::mock_args(listener)
  expect_equal(mock_args[[call]][[1]], t)
  expect_equal(mock_args[[call]][[2]]$to_vector(), target)
}

Try the individual package in your browser

Any scripts or data that you put into this service are public.

individual documentation built on July 15, 2022, 5:06 p.m.