tests/testthat/test-create_Time.R

test_that("create a new column with time data", {
  expect_equal(
    sample.data.environment %>% 
      add_Time_col() %>% length(), 4)
  
  expect_equal(
    sample.data.environment %>% 
      add_Time_col(Time = Test) %>% names() %>% .[4], "Test")
  
  expect_equal(
    sample.data.environment %>% 
      add_Time_col() %>% 
      dplyr::pull(Time) %>% 
      hms::is_hms() , TRUE)
})

Try the LightLogR package in your browser

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

LightLogR documentation built on June 10, 2025, 5:12 p.m.