tests/testthat/test-formals.R

context("Manipulation of function parameters")

test_that("we can remove a variable from the formals of a function", {
    f <- function(x, y) y
    expect_equal(names(formals(f %>% remove_formal(x))), "y")
})

Try the foolbox package in your browser

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

foolbox documentation built on May 1, 2019, 8:44 p.m.