tests/testthat/test-month_name.R

# Test month_name function
testthat::test_that("month_name function works correctly", {
  # Test for numeric to month name transformation in English
  expect_equal(as.character(month_name(1, "en")), "January")
  # Test for numeric to month name transformation in French
  expect_equal(as.character(month_name(1, "fr")), "Janvier")
  # Test for numeric to month name transformation in German
  expect_equal(as.character(month_name(1, "de")), "Januar")
})

Try the vvconverter package in your browser

Any scripts or data that you put into this service are public.

vvconverter documentation built on June 22, 2024, 10:53 a.m.