tests/testthat/test-variable_calculations.R

context("Unit tests for fill_na_mean")
test_that("fill_na_mean fills the NA with 3", {
  actual <- fill_na_mean(c(2, 2, NA, 5, 3, NA))
  expected <- c(2, 2, 3, 5, 3, 3)
  expect_equal(actual, expected)
})
gontcharovd/WineReviews documentation built on Feb. 29, 2020, 12:42 a.m.