import { describe, expect, it } from "bun:test"; import { parseCheckstyleOutput } from "../../linters/checkstyle"; describe("parseCheckstyleOutput", () => { it("should parse checkstyle XML", () => { const xml = ` `; const diagnostics = parseCheckstyleOutput(xml); expect(diagnostics).toHaveLength(2); expect(diagnostics[0]?.file).toBe("src/Main.java"); expect(diagnostics[0]?.severity).toBe("error"); expect(diagnostics[1]?.severity).toBe("warning"); }); it("should handle empty XML", () => { expect(parseCheckstyleOutput("")).toHaveLength(0); }); });