testthat Testing Framework

Overview

Qualified supports the testthat testing framework.

testthat Quick Start

say_hello <- function(name = NULL) {
  if( !is.null(name) )
    paste("Hello, ", name, "!", sep="")
  else
    "Hello there!"
}
describe("Code Challenge Sample", {
  it("should say hello", {
    expect_equal(say_hello("Qualified"), "Hello, Qualified!")
  })
  it("should handle blank input", {
    expect_equal(say_hello(), "Hello there!")
  })
})

Learn More

You can learn more on the testthat website.