tests/testthat/test-construct_diff.R

test_that("construct_diff", {
  expect_snapshot({
    construct_diff(
      list(a = head(cars,2), b = "aaaaaaaaaaaaaaaaaaaa", c = "Foo"),
      list(a = head(iris,1), b = "aaaaaaaaaaaaaaaaaaaa", c = "foo"),
      interactive = FALSE
    )

    construct_diff(
      list(a = head(cars,2), b = "aaaaaaaaaaaaaaaaaaaa", c = "Foo"),
      list(a = head(iris,1), b = "aaaaaaaaaaaaaaaaaaaa", c = "foo"),
      interactive = FALSE
    )

    construct_diff(
      list(a = head(cars,2), b = "aaaaaaaaaaaaaaaaaaaa", c = "Foo"),
      list(a = head(iris,1), b = "aaaaaaaaaaaaaaaaaaaa", c = "foo"),
      opts_data.frame("read.table"),
      interactive = FALSE
    )

    construct_diff(1,1)
  })
})

Try the constructive package in your browser

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

constructive documentation built on April 3, 2025, 9:39 p.m.