tests/testthat/test_print-advice.R

library(testthat)

img <- load_image()
adv <- get_advice()

test_that("Check data types", {
  expect_error(print_advice(img, not_string))
  expect_error(print_advice(not_image, adv))
})
katiejolly/advicegiveR documentation built on May 22, 2019, 11:52 p.m.