It seems that in one of the recent updates {cli} was significantly modified.
Among all the changes (which introduced issues in snapshot tests), there are a few (new?) functions I'd like to draw your attention to:
cli::cli_bullets
This function accepts a named character vector of messages that are then glue-interpolated and printed. Vector names are used to determine the symbol at the beginning, i.e. *, >, !, etc.
We could now aggregate our detail messages (in ui_throw or similar functions) using cli_bullets.
We can even make something like this:
It seems that in one of the recent updates {cli} was significantly modified. Among all the changes (which introduced issues in snapshot tests), there are a few (new?) functions I'd like to draw your attention to:
cli::cli_bullets
This function accepts a named character vector of messages that are thenglue
-interpolated and printed. Vector names are used to determine the symbol at the beginning, i.e.*
,>
,!
, etc. We could now aggregate our detail messages (inui_throw
or similar functions) usingcli_bullets
. We can even make something like this:which will work as
bullets(`*` := "Text 1", `!` := "Text 2 with {.strong interpolation}")
.cli::test_that_cli
, which allows configuring {testthat} and styles of {cli} for the duration of test.It may be worth investigating if any of these functions can be (later) used in {rextendr}.