From 16b65ae475fbfa784786e53438dfe370846c8f81 Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Sat, 9 Dec 2023 23:34:55 -0500 Subject: [PATCH] set up shinytest2 --- .Rbuildignore | 1 + .gitignore | 2 ++ DESCRIPTION | 1 + tests/testthat/setup-shinytest2.R | 2 ++ 4 files changed, 6 insertions(+) create mode 100644 tests/testthat/setup-shinytest2.R diff --git a/.Rbuildignore b/.Rbuildignore index 5e4a333..2be2762 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,2 +1,3 @@ ^LICENSE\.md$ ^\.github$ +_\.new\.png$ diff --git a/.gitignore b/.gitignore index dc528e5..175c756 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .Rhistory +# {shinytest2}: Ignore new debug snapshots for `$expect_values()` +*_.new.png diff --git a/DESCRIPTION b/DESCRIPTION index 4e853d7..2377716 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -32,5 +32,6 @@ Collate: 'unipartiteNetwork.R' 'ui.R' Suggests: + shinytest2, testthat (>= 3.0.0) Config/testthat/edition: 3 diff --git a/tests/testthat/setup-shinytest2.R b/tests/testthat/setup-shinytest2.R new file mode 100644 index 0000000..be65b4f --- /dev/null +++ b/tests/testthat/setup-shinytest2.R @@ -0,0 +1,2 @@ +# Load application support files into testing environment +shinytest2::load_app_env()