Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Oct 8, 2024
1 parent 2f652ea commit 004feb7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/testthat/test-label-compose.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test_that("compose_labels can chain together functions", {

labeller <- compose_label(`-`, label_number(suffix = " foo"), toupper)
expect_equal(
labeller(c(0.1, 1.0, 10.0)),
c("-0.1 FOO", "-1.0 FOO", "-10.0 FOO"),
ignore_attr = TRUE
)

})

0 comments on commit 004feb7

Please sign in to comment.