From d10128f61b7370590c42356649980f633a120a63 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Thu, 12 Oct 2023 13:28:02 +0200 Subject: [PATCH] add testthat helper state --- tests/testthat/helper-state.R | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/testthat/helper-state.R diff --git a/tests/testthat/helper-state.R b/tests/testthat/helper-state.R new file mode 100644 index 000000000..588923f31 --- /dev/null +++ b/tests/testthat/helper-state.R @@ -0,0 +1,13 @@ +testthat::set_state_inspector(function() { + list( + attached = search(), + connections = nrow(showConnections()), + cwd = getwd(), + envvars = Sys.getenv(), + libpaths = .libPaths(), + locale = Sys.getlocale(), + options = .Options, + packages = .packages(all.available = TRUE), + NULL + ) +})