Roo-Code/src/services/tree-sitter/__tests__/inspectSolidity.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

25 lines
840 B
TypeScript

import { debugLog, inspectTreeStructure, testParseSourceCodeDefinitions } from "./helpers"
import { solidityQuery } from "../queries"
import { sampleSolidity } from "./fixtures/sample-solidity"
describe("inspectSolidity", () => {
const testOptions = {
language: "solidity",
wasmFile: "tree-sitter-solidity.wasm",
queryString: solidityQuery,
extKey: "sol",
}
it("should inspect Solidity tree structure", async () => {
const result = await inspectTreeStructure(sampleSolidity, "solidity")
expect(result).toBeDefined()
debugLog("Tree Structure:", result)
})
it("should parse Solidity definitions", async () => {
const result = await testParseSourceCodeDefinitions("test.sol", sampleSolidity, testOptions)
expect(result).toBeDefined()
expect(result).toMatch(/\d+--\d+ \|/)
debugLog("Parse Result:", result)
})
})