tests/testthat/test-resolve.R

test_that("detects promise forced", {
  e <- rlang::new_environment()
  rlang::env_bind_lazy(e, x = 1 + 1)
  expect_false(promise_was_forced("x", e))
  e$x
  expect_true(promise_was_forced("x", e))
})

Try the cartographer package in your browser

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

cartographer documentation built on March 19, 2026, 5:07 p.m.