tests/testthat/test-arguments_check_rba_args_opts.R

test_that(".rba_args_opts works", {

  .rba_args_opts_nested <- function(...) {
    dir_name <- "test"
    save_file <- TRUE
    .rba_args_opts_nested2 <- function(...) {
      .rba_args_opts(...)
    }
    .rba_args_opts_nested2(...)
  }

  expect_has_names(
    obj = .rba_args_opts_nested(what = "cons"),
    expected = c("dir_name", "save_file")
  )
  expect_has_names(
    obj = .rba_args_opts_nested(what = "cond"),
    expected = c("dir_name", "save_file")
  )

})

Try the rbioapi package in your browser

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

rbioapi documentation built on April 4, 2025, 5:04 a.m.