tests/testthat/test-browse.R

context("Detecting whether we can browse at the error")

test_that("primitive functions are detected", {

  f <- function(x, y) if (1) x + y
  dump <- get_dump( 1 %>% f("foo") )
  expect_true(attr(dump, "pipes")$can_browse)

  g <- `+`
  dump <- get_dump( 1 %>% g("foo") )
  expect_false(attr(dump, "pipes")$can_browse)
})
gaborcsardi/tamper documentation built on May 16, 2019, 4:16 p.m.