Debian Codegraph @

tests/testthat/test-once.R

raw
1
2 test_that("once() returns TRUE only once", {
3
4 method <- function() {
5 expect_true(once())
6 expect_false(once())
7 expect_false(once())
8 }
9
10 method()
11 expect_error(method())
12
13 })