tests/testthat/test_get_index.R

test_that("get_index gives no error with US1YI", {
  testthat::expect_silent(get_index("US1YI"))
})

test_that("get_index gives no error with USVI", {
  testthat::expect_silent(get_index("USVI"))
})

test_that("get_index gives no error with USBODI", {
  testthat::expect_silent(get_index("USBODI"))
})

test_that("get_index gives no error with USCI", {
  testthat::expect_silent(get_index("USCI"))
})

test_that("get_index gives error with wrong code", {
  testthat::expect_error(get_index("XXX"))
})
EnriquePH/marketconf documentation built on Aug. 7, 2023, 1:36 p.m.