tests/testthat/test_rank_species.R

library("star.rank")


# Test rank_species function (args = (interested, n=optional))
test_that("" , {
  expect_error(rank_species(interested = "average_weight"))
  expect_error(rank_species(), "'interested' argument must be character string")
  expect_error(rank_species(interested = 10), "'interested' argument must be character string")
  expect_error(rank_species(interested = "average_height", n = "10"), "'n' argument must be type double")
  expect_type(rank_species(interested = "average_lifespan"), "list")
})
The0therChad/star.rank documentation built on March 27, 2022, 4:24 p.m.