From 12eabc4d0cfa844755f004e04fdf8a27c245e7c7 Mon Sep 17 00:00:00 2001 From: Simon Innerbichler Date: Mon, 25 May 2026 09:36:45 +0200 Subject: [PATCH] added thestthat test files in tests/testthat/ --- .gitignore | 4 ++++ DESCRIPTION | 4 +++- tests/testthat.R | 12 ++++++++++++ tests/testthat/test-backend.R | 3 +++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tests/testthat.R create mode 100644 tests/testthat/test-backend.R diff --git a/.gitignore b/.gitignore index 11cf1f5..1ca8486 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ .RData .Ruserdata .positai +.png +man +docs +pkgdown diff --git a/DESCRIPTION b/DESCRIPTION index ca45268..8cca336 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -41,4 +41,6 @@ License: Commercial, all rights reserved Encoding: UTF-8 LazyData: true Config/roxygen2/version: 8.0.0 - +Suggests: + testthat (>= 3.0.0) +Config/testthat/edition: 3 diff --git a/tests/testthat.R b/tests/testthat.R new file mode 100644 index 0000000..09ab410 --- /dev/null +++ b/tests/testthat.R @@ -0,0 +1,12 @@ +# This file is part of the standard setup for testthat. +# It is recommended that you do not modify it. +# +# Where should you do additional test configuration? +# Learn more about the roles of various files in: +# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview +# * https://testthat.r-lib.org/articles/special-files.html + +library(testthat) +library(DashboardApp) + +test_check("DashboardApp") diff --git a/tests/testthat/test-backend.R b/tests/testthat/test-backend.R new file mode 100644 index 0000000..8849056 --- /dev/null +++ b/tests/testthat/test-backend.R @@ -0,0 +1,3 @@ +test_that("multiplication works", { + expect_equal(2 * 2, 4) +})