tests/testthat/test-ai_tool_ls_tool.R

test_that("ls_tool - invalid args", {
  expect_error(ls_tool(list()), "Invalid arguments for LSTool")
})

test_that("ls_tool", {
  mock_file <- tempfile()
  # Make sure there's at least one file.
  writeLines("FILE_CONTENT", mock_file)
  expect_true(grepl(
    basename(mock_file),
    ls_tool(list(dirPath = tempdir()))$output
  ))
})

Try the myownrobs package in your browser

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

myownrobs documentation built on Nov. 5, 2025, 5:52 p.m.