tests/testthat/test-rest-geneOntology.R

test_that("current", {
    x <- geneOntology(genes)
    expect_s4_class(x, "SimpleList")
    expect_named(x, unname(genes))
    expect_named(
        object = x[[1L]],
        expected = c(
            "biologicalProcess",
            "cellularComponent",
            "molecularFunction"
        )
    )
})

test_that("Invalid gene", {
    expect_error(
        object = geneOntology("WBGene00000000"),
        regex = "isAnExistingUrl"
    )
})
acidgenomics/r-wormbase documentation built on Oct. 3, 2023, 1:22 p.m.