tests/testthat/test-interactive-elements.R

times <- 1:10

test_that("selecting time points lower than minimum is prevented", {
  expect_true(get_time_point(times, min(times), "next") == min(times))
})

test_that("selecting time points higher than maximum is prevented", {
  expect_true(get_time_point(times, max(times), "previous") == max(times))
})

Try the slendr package in your browser

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

slendr documentation built on June 22, 2024, 6:56 p.m.