tests/test-modules/12_counter/tests/testthat/test-utils.R

# Test the lexical_sort function from R/utils.R
test_that("Lexical sorting works", {
  expect_equal(lexical_sort(c(1, 2, 3)), c(1, 2, 3))
  expect_equal(lexical_sort(c(1, 2, 3, 13, 11, 21)), c(1, 11, 13, 2, 21, 3))
})

Try the shiny package in your browser

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

shiny documentation built on Sept. 11, 2024, 7:24 p.m.