tests/testthat/test-getOrganismCode.R

library(BridgeDbR)
context("simple")

test_that("it returns an Organism code", {
    expect_equal("Hs", getOrganismCode("Homo sapiens"))
})

test_that("it gives an error for 'Foo'", {
    expect_that(getOrganismCode("Foo"), throws_error("Unknown species: Foo"))
})

Try the BridgeDbR package in your browser

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

BridgeDbR documentation built on Nov. 8, 2020, 5:09 p.m.