Skip to content

Commit 64a0403

Browse files
committed
Suppress cli wrapping
1 parent a3c6b43 commit 64a0403

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

R/snapshot-value.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ check_roundtrip <- function(
116116
tolerance = tolerance
117117
)
118118
if (length(check) > 0) {
119+
# Supress cli wrapping
120+
check <- gsub(" ", "\u00a0", check, fixed = TRUE)
121+
check <- gsub("\n", "\f", check, fixed = TRUE)
122+
119123
cli::cli_abort(
120124
c(
121125
"{.code {label}} could not be safely serialized with {.arg style} = {.str {style}}.",

tests/testthat/_snaps/snapshot-value.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
! `foo` could not be safely serialized with `style` = "json".
7979
Serializing then deserializing the object returned something new:
8080
81-
`original` is NULL `new` is a list
81+
`original` is NULL
82+
`new` is a list
8283
i You may need to try a different `style`.
8384

8485
# expect_snapshot_value validates its inputs

0 commit comments

Comments
 (0)