context("comparator lookup")
VA2_SPEK <- read_spek(get_spek_path('va2'))
test_that("comparator can be looked up by @id",{
result <- lookup_comparator("_:m1001", VA2_SPEK)
expect_identical(name_of_comparator(result), "peer_ave")
expect_true(length(result) > 0)
})
test_that("no matching identifier raises warning",{
expect_warning(lookup_comparator("NotPresent", VA2_SPEK))
})
test_that("no matching identifier returns empty list",{
result <- expect_warning(lookup_comparator("NotPresent", VA2_SPEK))
expect_identical(result, list())
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.