|
|
@@ -169,6 +169,8 @@ describe("Tree-sitter Service", () => {
|
|
|
"/test/path/main.rs",
|
|
|
"/test/path/program.cpp",
|
|
|
"/test/path/code.go",
|
|
|
+ "/test/path/app.kt",
|
|
|
+ "/test/path/script.kts",
|
|
|
]
|
|
|
|
|
|
;(listFiles as jest.Mock).mockResolvedValue([mockFiles, new Set()])
|
|
|
@@ -197,6 +199,8 @@ describe("Tree-sitter Service", () => {
|
|
|
rs: { parser: mockParser, query: mockQuery },
|
|
|
cpp: { parser: mockParser, query: mockQuery },
|
|
|
go: { parser: mockParser, query: mockQuery },
|
|
|
+ kt: { parser: mockParser, query: mockQuery },
|
|
|
+ kts: { parser: mockParser, query: mockQuery },
|
|
|
})
|
|
|
;(fs.readFile as jest.Mock).mockResolvedValue("function test() {}")
|
|
|
|
|
|
@@ -207,6 +211,8 @@ describe("Tree-sitter Service", () => {
|
|
|
expect(result).toContain("main.rs")
|
|
|
expect(result).toContain("program.cpp")
|
|
|
expect(result).toContain("code.go")
|
|
|
+ expect(result).toContain("app.kt")
|
|
|
+ expect(result).toContain("script.kts")
|
|
|
})
|
|
|
|
|
|
it("should normalize paths in output", async () => {
|