tests/testthat/test-gvtrack-clear.R

create_isolated_test_db()

test_that("gvtrack.clear removes all virtual tracks for the current working directory", {
    gvtrack.create("vt_clear_1", "test.fixedbin", "max")
    gvtrack.create("vt_clear_2", "test.fixedbin", "avg")
    expect_true(all(c("vt_clear_1", "vt_clear_2") %in% gvtrack.ls()))

    gvtrack.clear()
    expect_null(gvtrack.ls())
})

test_that("gvtrack.clear is a no-op when there are no virtual tracks", {
    gvtrack.clear()
    expect_null(gvtrack.ls())
    expect_silent(gvtrack.clear())
})

Try the misha package in your browser

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

misha documentation built on Aug. 24, 2026, 5:14 p.m.