tests/testthat/test-arrow.R

library(testthat)

test_that("arrow works", {

  expect_equal(
    arrow("up"),
    emoji_name[["arrow_up"]]
  )

  expect_equal(
    arrow(c("down-right", "down")),
    unname(emoji_name[c("down_right_arrow", "arrow_down")])
  )

  expect_equal(
    arrow(c("up", "nothing")),
    c(emoji_name[["arrow_up"]], NA)
  )
})

Try the emoji package in your browser

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

emoji documentation built on Oct. 30, 2024, 9:28 a.m.