tests/testthat/test-zzz.R

test_that("map_if works with function predicates", {
  expect_equal(
    map_if(letters[1:5], function(x) identical(x, "c"), toupper),
    list("a", "b", "C", "d", "e")
  )
})

Try the decor package in your browser

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

decor documentation built on July 9, 2023, 6:41 p.m.