mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-09 03:17:58 +00:00
25 lines
840 B
TypeScript
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)
|
|
})
|
|
})
|