Skip to content

Commit 878873e

Browse files
committed
Fix test
1 parent 50bf4f2 commit 878873e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/testthat/test-render.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ test_that("R Markdown documents can be rendered", {
1212
})
1313

1414

15-
test_that("`quarto_render()` is wrapable", {
15+
test_that("`quarto_render(as_job = TRUE)` is wrapable", {
1616
skip_if(is.null(quarto_path()))
1717
skip_if_not_installed("rstudioapi")
1818
skip_if_not_installed("rprojroot")
1919
skip_if(!rstudioapi::isAvailable())
2020
dir <- rprojroot::find_testthat_root_file()
2121
input <- file.path(dir, "test.Rmd")
2222
output <- file.path(dir, "test.html")
23-
wrapper <- function(path) quarto_render(path, quiet = TRUE)
23+
wrapper <- function(path) quarto_render(path, quiet = TRUE, as_job = TRUE)
24+
# wait for background job to finish (10s should be conservative enough)
25+
Sys.sleep(10)
2426
wrapper(input)
2527
expect_true(file.exists(output))
2628
unlink(output)

0 commit comments

Comments
 (0)