tests/testthat/test_bowler_summary.R

library(tibble)
library(dplyr)
library(testthat)


df <- data.frame(
  "statistic" = c("Most Overs", "Most Runs", "Most Wickets", "Most Matches", "Most Innings"),
  "bowler" = c("Harbhajan Singh", "Piyush Chawla", "Lasith Malinga", "Suresh Raina", "Harbhajan Singh"),
  "value" = c(562.2, 4072.0, 170.0, 193.0, 157.0)
)

test_that("check bowler summary", {
  expect_identical(df, bowler_summary())
})
Swaha294/ipl documentation built on May 10, 2022, 3:23 p.m.