tests/testthat/test-invert_list_names_and_values.R

test_that("invert_list_names_and_values() works", {
  expect_equal(
    invert_list_names_and_values(list(A = "a", B = "b")),
    list(a = "A", b = "B")
  )
  expect_equal(
    invert_list_names_and_values(list()),
    list()
  )
})

Try the rstudio.prefs package in your browser

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

rstudio.prefs documentation built on July 16, 2022, 5:07 p.m.