tests/testthat/test-searchDatasets.R

context("searchDatasets")

host <- "http://1kgenomes.ga4gh.org/"

test_that("searchDatasets works", {
    skip_on_bioc()
    response <- searchDatasets(host)
    expect_is(response, "DataFrame")
    expect_named(response, c("description", "id", "name"))
    expect_equal(nrow(response), 1)
})

test_that("searchDatasets nrows parameter works", {
    skip_on_bioc()
    response <- searchDatasets(host, nrows = 1)
    expect_equal(dim(response), c(1, 3))
})

test_that("searchDatasets responseSize parameter works", {
    skip_on_bioc()
    response <- searchDatasets(host, responseSize = 1)
    expect_equal(dim(response), c(1, 3))
})

Try the GA4GHclient package in your browser

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

GA4GHclient documentation built on Nov. 8, 2020, 5:47 p.m.