tests/testthat/test_batsman_summary.R

library(testthat)
library(dplyr)

test_that("check for invalid input", {
  expect_error(batsman_summary(99),
    regexp = "should be a character"
  )
})

test_that("check when data not found", {
  expect_error(batsman_summary("V Kohlu"),
    regexp = "not found"
  )
})
Swaha294/ipl documentation built on May 10, 2022, 3:23 p.m.