tests/testthat/test-transform_input.R

test_that("transform_input works as expected", {
  input = list("A;var1", "B;var1", "C;var1")
  filter_element = transform_input(input)

  # Check if the column name is correctly extracted
  expect_equal(filter_element[[1]], "var1")

  # Check if the values are correctly extracted
  expect_equal(filter_element[[2]], list("A", "B", "C"))
})

Try the vvshiny package in your browser

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

vvshiny documentation built on July 26, 2023, 5:50 p.m.