Skip to content

Commit

Permalink
usethis::use_testthat(3)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Nov 4, 2023
1 parent 24a2231 commit 2799656
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 12 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ Imports:
crayon
Suggests:
Rcpp,
testthat,
testthat (>= 3.0.0),
withr
RoxygenNote: 7.2.3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Config/Needs/website: tidyverse/tidytemplate
Config/testthat/edition: 3
6 changes: 6 additions & 0 deletions R/progress-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
## usethis namespace: end
NULL
31 changes: 31 additions & 0 deletions man/progress-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 11 additions & 5 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,6 +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

if (Sys.getenv("NOT_CRAN", "") != "") {
library(testthat)
library(progress)
test_check("progress")
}
library(testthat)
library(progress)

test_check("progress")
3 changes: 0 additions & 3 deletions tests/testthat/test-cpp.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

context("C++ API")

test_that("C++ API works", {

skip_on_cran()
Expand Down
3 changes: 0 additions & 3 deletions tests/testthat/test-progress.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

context("Progress bar")

test_that("Vanilla progress bar works", {

out <- get_output({
Expand Down

0 comments on commit 2799656

Please sign in to comment.