Fix and simplify reactlog's version check approach. (#4012)

* Close #4011. Fix and simplify reactlog's version check approach.

* Better variable name

* Use test_path() for consistent path location

* Just use packageDescription()

* Update tests/testthat/test-reactlog.R

* Update tests/testthat/test-reactlog.R

* Update DESCRIPTION
This commit is contained in:
Carson Sievert
2024-03-22 17:39:52 -05:00
committed by GitHub
parent 7ed68ed927
commit 7742b652ba
2 changed files with 19 additions and 53 deletions

View File

@@ -126,3 +126,16 @@ test_that("message logger appears", {
})
})
test_that("reactlog_version is as expected", {
suggests <- strsplit(packageDescription("shiny")$Suggests, ",")[[1]]
reactlog <- trimws(
grep("reactlog", suggests, value = TRUE)
)
expect_length(reactlog, 1)
expect_equal(
reactlog,
sprintf("reactlog (>= %s)", reactlog_min_version)
)
})