13.9 Expect functions

  • an exception is the atom of testing
  • they start with expect_
  • two main arguments, first is the actual result and second is what you expect
  • if actual and expected don’t agree, testthat throws an error
  • some expectations have additional arguments for finer details
  • over 40 expectations in the testthat package