Skip to content

testdat 0.4.0

Compare
Choose a tag to compare
@gorcha gorcha released this 06 Jan 00:40
  • testdat now has a test data pipe (#60)! You can use the test data pipe %E>% to add expectations to a pipe chain.
mtcars %E>%
  expect_base(mpg, TRUE) %>%
  mutate(mpg = NA) %E>%
  expect_base(mpg, FALSE)

This is a shorthand way of piping into the with_testdata() function.

mtcars %>%
  with_testdata(expect_base(mpg, TRUE)) %>%
  mutate(mpg = NA) %>%
  with_testdata(expect_base(mpg, FALSE))
  • set_testdata() previously always returned a data frame, and evaluated the test data if it was stored as a quosure. It now returns the data as it was stored, to get around a bug when piping data into the with_testdata() function (#60).