tests/testthat/test-list.R

with_mock_dir("../httptest/list", {
        
    test_that("list", {
        
        expect_error(
            epList("wrong"),
            "'type' must be one of the listable elements returned by epTypes.",
            fixed = TRUE
        )
        
        expect_error(
            epList("package", "wrong"),
            "'pkg' cannot be defined when listing packages.",
            fixed = TRUE
        )
        
        expect_error(
            epList("reaction", "wrong"),
            "Not found. Please check that 'type' and 'pkg' are correct.",
            fixed = TRUE
        )
          
        pkg_df <- epList("package")
          
        expect_s3_class(pkg_df, "data.frame")
          
        expect_length(pkg_df, 10L)
    })
})

Try the enviPathR package in your browser

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

enviPathR documentation built on Oct. 14, 2026, 5:07 p.m.