tests/testthat/test-get_ngram_from_book.R

test_that("function returns a data frame", {
  result <- get_ngram_from_books()
  expect_s3_class(result, "data.frame")
})

test_that("function returns a data frame with the correct columns", {
  result <- get_ngram_from_books()
  expect_named(result, c("values", "ind"))
})

Try the dhlabR package in your browser

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

dhlabR documentation built on Sept. 11, 2024, 9:12 p.m.