From 4a2e1b65cb747c5b073b243dc848eab1cffc4d84 Mon Sep 17 00:00:00 2001 From: Winston Chang Date: Wed, 12 Jul 2017 16:22:13 -0500 Subject: [PATCH] Add shiny-test-apps submodule --- .gitmodules | 3 +++ tests/testthat/apps | 1 + tests/testthat/test-apps.R | 12 ++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 .gitmodules create mode 160000 tests/testthat/apps create mode 100644 tests/testthat/test-apps.R diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..0a12be347 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "tests/testthat/apps"] + path = tests/testthat/apps + url = git@github.com:rstudio/shiny-test-apps.git diff --git a/tests/testthat/apps b/tests/testthat/apps new file mode 160000 index 000000000..410170106 --- /dev/null +++ b/tests/testthat/apps @@ -0,0 +1 @@ +Subproject commit 410170106278afbe6da08d82912b3c7a087a48af diff --git a/tests/testthat/test-apps.R b/tests/testthat/test-apps.R new file mode 100644 index 000000000..48577919f --- /dev/null +++ b/tests/testthat/test-apps.R @@ -0,0 +1,12 @@ +context("apps") + +if (dir.exists("apps")) { + app_dirs <- Filter(dir.exists, dir("apps", full.names = TRUE)) + if (length(app_dirs) > 0) { + for (app_dir in app_dirs) { + test_that(basename(app_dir), { + shinytest::expect_pass(shinytest::testApp(app_dir)) + }) + } + } +}