tests/testthat/test-find_precip_anom.R

context("test-find_precip_anom")

source("R/find_precip_anom.R")

library(testthat)


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

  expect_true(as.integer(find_precip_anom(test_data)$min_precip) == 1)

}
)
kellyodion/ESM262-function-HW documentation built on June 14, 2019, 12:31 p.m.