tests/testthat/test-getSomaScanVersion.R

test_that("`getSomaScanVersion()` returns the ADAT version string", {
  expect_equal(getSomaScanVersion(example_data), "V4")
})

test_that("`checkSomaScanVersion()` returns the correct error mode", {
  expect_null(checkSomaScanVersion("V4"))
  expect_null(checkSomaScanVersion("v4"))
  expect_null(checkSomaScanVersion("v4.1"))
  expect_null(checkSomaScanVersion("v5.0"))
  expect_null(checkSomaScanVersion("v5"))
  expect_error(checkSomaScanVersion("V2"), "Unsupported")
  expect_error(checkSomaScanVersion("foo"), "Unsupported")
})

Try the SomaDataIO package in your browser

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

SomaDataIO documentation built on April 4, 2025, 2:14 a.m.