tests/testthat/test-names_list.R

context("names_list")

test_that("names_list returns the correct dimensions", {
	expect_equal(length(names_list('species')), 10)
	expect_equal(length(names_list('species', size=20)), 20)
	expect_equal(length(names_list('order', size=2)), 2)
})

test_that("names_list returns the correct class", {
	expect_is(names_list('species'), "character")
})

Try the taxize package in your browser

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

taxize documentation built on April 22, 2022, 9:07 a.m.