tests/testthat/test-is-output-same.R

context("is.output.same")

test_that("is.output.same returns logical", {
  expect_type(is.output.same(sum(1:3), prod), "logical")
})

test_that("is.output.same returns false for outputs of different class", {
  expect_false(is.output.same(sum(1:3), prod))
})

test_that("is.output.same throws warning when piped", {
  expect_warning(sum(1:3) %>% is.output.same(prod))
})

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.