test_that("it creates DataFrame", {
create_ncbi_basic_tax_dataframe("9606")%>%
expect_s3_class("data.frame")
})
test_that("it returns correct values ", {
create_ncbi_basic_tax_dataframe("9606", c("kingdom"))%>%
dplyr::pull("kingdom")%>%
expect_equal("Metazoa")
create_ncbi_basic_tax_dataframe("9606", c("kingdom","no_existo"))%>%
dplyr::pull("no_existo")%>%
expect_error()
})
test_that("it allows vectorization", {
create_ncbi_basic_tax_dataframe(c("9606", "9544"))%>%
dplyr::pull("species")%>%
expect_equal(c("Homo sapiens", "Macaca mulatta"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.