Initial commit: pygenium as git submodule
This commit is contained in:
25
tests/agents.test.ts
Normal file
25
tests/agents.test.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* agents.test.ts — markdown agent-definition loader.
|
||||
*/
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { extensionRoot, loadAgents } from "../src/agents.js";
|
||||
|
||||
describe("loadAgents", () => {
|
||||
it("loads scanner.md and fixer.md shipped with the extension", async () => {
|
||||
const agents = await loadAgents();
|
||||
expect(agents.has("scanner")).toBe(true);
|
||||
expect(agents.has("fixer")).toBe(true);
|
||||
const scanner = agents.get("scanner");
|
||||
expect(scanner).toBeDefined();
|
||||
expect(scanner?.systemPrompt).toContain("scanner");
|
||||
expect(scanner?.allowedTools).toContain("read");
|
||||
expect(scanner?.allowedTools).not.toContain("edit"); // scanner is read-only
|
||||
expect(scanner?.sourcePath).toContain("agents/scanner.md");
|
||||
const fixer = agents.get("fixer");
|
||||
expect(fixer?.allowedTools).toContain("edit");
|
||||
});
|
||||
|
||||
it("extensionRoot resolves to the package directory", () => {
|
||||
expect(extensionRoot()).toMatch(/pygienium$/);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user