tests/testthat/test-get_sp500.R

test_that("get_sp500 returns something", {

  tickers <- rfinance::get_sp500()
  testthat::expect_true(is.character(tickers))
  testthat::expect_true(length(tickers) > 0)
})

Try the rfinance package in your browser

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

rfinance documentation built on Oct. 26, 2021, 9:07 a.m.