tests/testthat/test-spark.R

test_that_cli(configs = c("plain", "unicode"), "spark_bar", {
  expect_snapshot({
    spark_bar(seq(0, 1, length.out = 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.out = 10))
  })
})
r-lib/cli documentation built on April 5, 2025, 7:11 p.m.