Set up test infrastructure

  1. Call use_testthat() sets up the testing framework by:
  • Adding Suggests: testthat to DESCRIPTION
  • Creating the directory tests/testthat/
  • Adding the script tests/testthat.R.
  • Updating the DESCRIPTION
  1. Call use_test("strsplit1") to create the file tests/testthat/test-strsplit1.R where we are going to write our test.