tests/testthat/test_llamaindex_setup.R

test_that("rag uses modern llama-index import path", {
  rag_path <- normalizePath(testthat::test_path("..", "..", "R", "rag.R"), mustWork = FALSE)
  skip_if_not(file.exists(rag_path))

  src <- paste(readLines(rag_path, warn = FALSE), collapse = "\n")
  expect_false(grepl("llama_index\\.legacy", src))
  expect_true(grepl("te_validate_modern_llama_index", src, fixed = TRUE))
})

Try the transforEmotion package in your browser

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

transforEmotion documentation built on Oct. 26, 2026, 5:07 p.m.