Roo-Code/src/services/tree-sitter/__tests__/inspectEmbeddedTemplate.spec.ts
Chris Estreich 62c3914034
Farewell jest (#4607)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-16 21:39:45 -07:00

23 lines
942 B
TypeScript

import { inspectTreeStructure, testParseSourceCodeDefinitions } from "./helpers"
import { embeddedTemplateQuery } from "../queries"
import sampleEmbeddedTemplateContent from "./fixtures/sample-embedded_template"
describe("inspectEmbeddedTemplate", () => {
const testOptions = {
language: "embedded_template",
wasmFile: "tree-sitter-embedded_template.wasm",
queryString: embeddedTemplateQuery,
extKey: "erb", // Match the file extension we're using
}
it("should inspect embedded template tree structure", async () => {
const result = await inspectTreeStructure(sampleEmbeddedTemplateContent, "embedded_template")
expect(result).toBeTruthy()
})
it("should parse embedded template definitions", async () => {
const result = await testParseSourceCodeDefinitions("test.erb", sampleEmbeddedTemplateContent, testOptions)
expect(result).toBeTruthy()
expect(result).toMatch(/\d+--\d+ \|/) // Verify line number format
})
})