tests/testthat/test.R

# Test CompanyInfo()

context("Data output dimensions")

skip_on_cran()

test_that("CompanyInfo returning correct dimensions", {
     expect_equal(dim(CompanyInfo("GOOG")), c(1, 8))
     expect_equal(dim(CompanyInfo("TSLA")), c(1, 8))
     expect_equal(dim(CompanyInfo("FB")), c(1, 8))
})

Try the finreportr package in your browser

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

finreportr documentation built on Jan. 17, 2022, 9:07 a.m.