Skip to content

Commit acc5cf8

Browse files
committed
Tweak error wrapper
1 parent d3c16cd commit acc5cf8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/expect-condition.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ cnd_matcher <- function(base_class,
322322
grepl(pattern, conditionMessage(x), ...),
323323
error = function(e) {
324324
cli::cli_abort(
325-
"Failed to compare message to {.arg pattern}.",
325+
"Failed to compare {base_class} to {.arg pattern}.",
326326
parent = e,
327327
call = error_call
328328
)

tests/testthat/_snaps/expect-condition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
expect_condition(stop("Hi!"), "x", foo = "bar")
4141
Condition
4242
Error in `expect_condition()`:
43-
! Failed to compare message to `pattern`.
43+
! Failed to compare condition to `pattern`.
4444
Caused by error in `grepl()`:
4545
! unused argument (foo = "bar")
4646

0 commit comments

Comments
 (0)