tests/testthat/test-hello.R

context('Testing the hello function')

test_that('Character input error works', {
  expect_error(hello(1234))
  expect_error(hello(1*2))
})

test_that('Test output of hello', {
  expect_equal(hello('Name'), 'Hello, Name!')
})
threadingdata/tester documentation built on Dec. 23, 2021, 9:58 a.m.