Nothing
# Positive Test Cases
## Test for Default Behavior (Unix Time)
test_that("getTime returns current time in Unix format by default", {
result <- getTime()
expect_s3_class(result, "POSIXct")
})
## Test for RFC 1123 Format
test_that("getTime returns current time in RFC 1123 format", {
result <- getTime("rfc")
expect_type(result, "character")
})
# Negative Test Cases
## Test for Invalid Format Input
test_that("getTime throws error for invalid format input", {
expect_error(getTime("invalid_format"),
"Invalid format specified. Use 'unix' or 'rfc'.")
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.