Hi, I just noticed that code inside testthat::it (specifically with testthat::) does not have access to global variables when invoked with testthat::test_file() (or other runners). Sourcing the same file works fine. Using library(testthat) and just it works fine too. See examples below.
Hi, I just noticed that code inside
testthat::it
(specifically withtestthat::
) does not have access to global variables when invoked withtestthat::test_file()
(or other runners). Sourcing the same file works fine. Usinglibrary(testthat)
and justit
works fine too. See examples below.testthat version: 3.2.0
library
variantFile
Output
::
variantFile
Output