Skip to content

Commit

Permalink
test(quarto): fix ci running on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mutlusun committed Oct 30, 2024
1 parent 03848a3 commit d6f1772
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/testthat/test-tar_quarto.R
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,19 @@ targets::tar_test("tar_quarto() reruns if target changes in included file", {
expect_equal(sort(progress$name), sort(c("data", "report")))
out <- targets::tar_read(report)
out <- setdiff(out, "main_files")
expect_equal(sort(basename(out)), sort(c("main.html", "main.qmd", "file1.qmd")))
if (identical(tolower(Sys.info()[["sysname"]]), "windows")) {
expect_equal(
# On the windows CI, there seems to be issues and `fs::path_rel`. Because
# of that, `file1.qmd` is returned twice and we use `unique` here. On
# other platforms this issue does not exist.
#
# See https://github.com/ropensci/tarchetypes/pull/200 for a discussion.
sort(unique(basename(out))),
sort(c("main.html", "main.qmd", "file1.qmd"))
)
} else {
expect_equal(sort(basename(out)), sort(c("main.html", "main.qmd", "file1.qmd")))

Check warning on line 532 in tests/testthat/test-tar_quarto.R

View workflow job for this annotation

GitHub Actions / lint

file=tests/testthat/test-tar_quarto.R,line=532,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 84 characters.
}
# Should not rerun the report.
suppressMessages(targets::tar_make(callr_function = NULL))
progress <- targets::tar_progress()
Expand Down

0 comments on commit d6f1772

Please sign in to comment.