tests/testthat/test-wait.R

test_that("wait", {
  expect_type(wait_until(), "closure")

  my_fun <- function(...) {
    "available"
  }

  wait_for_test <- wait_until(
    my_fun,
    "test initializing"
  )

  expect_message(
    (out <- wait_for_test()),
    "Waiting for"
  )
  expect_null(out)
})

Try the sixtyfour package in your browser

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

sixtyfour documentation built on April 3, 2025, 8:22 p.m.