tests/testthat/test-spark.R

test_that_cli(configs = c("plain", "unicode"), "spark_bar", {
  expect_snapshot({
    spark_bar(seq(0, 1, length = 8))
    spark_bar(c(0, NA, 0.5, NA, 1))
  })
})

test_that_cli(configs = c("plain", "unicode"), "spark_line", {
  expect_snapshot({
    spark_line(seq(0, 1, length = 10))
  })
})

Try the cli package in your browser

Any scripts or data that you put into this service are public.

cli documentation built on March 31, 2023, 9:04 p.m.