Skip to content

Commit ecbf50e

Browse files
committed
test: make devtools::check() pass
1 parent 1ce80b2 commit ecbf50e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

DESCRIPTION

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ Imports:
1313
golem,
1414
here,
1515
pkgload,
16+
processx,
17+
rlang,
18+
uuid,
1619
withr
1720
Encoding: UTF-8
1821
Roxygen: list(markdown = TRUE)
1922
RoxygenNote: 7.3.2
2023
Suggests:
2124
future,
25+
httpuv,
2226
testthat (>= 3.0.0)
2327
Config/testthat/edition: 3

tests/testthat/test-pw-init-test-show-report.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ test_that("multiplication works", {
33
npx_is_available()
44
)
55
temp_golem <- file.path(tempdir(), "golem")
6+
unlink(temp_golem, recursive = TRUE, force = TRUE)
67
on.exit({
78
unlink(temp_golem, recursive = TRUE)
89
})
@@ -77,8 +78,9 @@ test_that("multiplication works", {
7778
{
7879
future::plan(future::multisession)
7980
pw_show_report_ <- force(pw_show_report)
81+
port <- httpuv::randomPort()
8082
ftr_report <- future::future({
81-
pw_show_report_(where = ".", "--port=8787")
83+
pw_show_report_(where = ".", sprintf("--port=%s", port))
8284
})
8385
on.exit({
8486
tools::pskill(
@@ -89,7 +91,7 @@ test_that("multiplication works", {
8991
expect_true(
9092
attr(
9193
curlGetHeaders(
92-
"http://localhost:8787"
94+
sprintf("http://localhost:%s", port)
9395
),
9496
"status"
9597
) == 200

0 commit comments

Comments
 (0)