Skip to content

Commit ea7df69

Browse files
committed
Try to find out why GitHub Actions fail
1 parent f3c8c13 commit ea7df69

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/testthat/test-function-setGlobalInspectionID.R

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
library(testthat)
1+
#library(testthat)
22

33
test_that("setGlobalInspectionID() works", {
44

@@ -8,7 +8,7 @@ test_that("setGlobalInspectionID() works", {
88

99
error.file <- file.path(tempdir(), "duplicates.txt")
1010

11-
expect_error(f(
11+
expect_error(regexp = "There were duplicates", f(
1212
inspection.data = list(
1313
inspections = data.frame(
1414
inspection_date = "2024-01-03",
@@ -26,5 +26,13 @@ test_that("setGlobalInspectionID() works", {
2626
error.file = error.file
2727
))
2828

29+
if (!file.exists(error.file)) {
30+
message(
31+
message("error.file does not exist: ", error.file)
32+
"files in dirname(error.file): ",
33+
kwb.utils::stringList(dir(dirname(error.file)))
34+
)
35+
}
36+
2937
expect_true(file.exists(error.file))
3038
})

0 commit comments

Comments
 (0)