Skip to content

Commit 4ab0ac2

Browse files
committed
Can't do snapshot with lua error
because of wide stack trace I can't hide But this test is still doing the right thing as we want the lua error ``` ! Error running quarto CLI from R. Caused by error: ! Could not evaluate cli `{}` expression: `captions`. Caused by error: ! object 'captions' not found ```
1 parent ee9a9ee commit 4ab0ac2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/testthat/test-render.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ test_that("{ } are escaped correctly in abort message", {
139139
)
140140
})
141141
withr::local_options(quarto.tests.hide_echo = TRUE)
142-
expect_snapshot(
143-
error = TRUE,
142+
expect_error(
144143
quarto_render(
145144
"pdf-error.qmd",
146145
quiet = FALSE,
147146
quarto_args = c("--log", "test.log")
148-
)
147+
),
148+
regexp = "Error returned by quarto CLI(.*)nil value \\(global 'internal_error'\\)"
149149
)
150150
})

0 commit comments

Comments
 (0)