tests/testthat/test-calc_extreme_rain_anom.R

# this is the test that doesn't say the function = 4 even though when you run it through the function says it = 4

test_that("please_work", {
  rain_test_data =
    data.frame(
        Date = c(1:4),
        Value = c(1:4),
        Anomaly = c(1:4)
    )

  expect_true(as.integer(calc_extreme_rain_anom(rain_test_data)$max_anom) == 4)

}
)
annaclairemarley/HW5262 documentation built on April 5, 2020, 8:59 p.m.