tests/testthat/test_find_call_piped.R

context("find_call_piped")

test_that("find_call_piped return has type 'language'", {
  expect_type(find_call_piped(sum(1:3)), "language")
  expect_type(find_call_piped(sum(1:3)), "language")
})

test_that("find_call_piped gives warning when piped", {
  expect_warning(sum(1:3) %>% find_call_piped())
})

Try the frite package in your browser

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

frite documentation built on July 1, 2018, 5:04 p.m.