Add embedded skill exporter and mcp config subcommands and bump to v0.7.0
This commit is contained in:
1 parent
ce06d8f600
commit
f1380873e4
13 files changed
+3393
-1505
No files matched your search
@@ -0,0 +1,27 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { mkdtempSync, rmSync, existsSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { EMBEDDED_SKILL_FILES, getSkillContent, installSkillFiles } from "./embedded-skill.js";
|
||||
|
||||
describe("embedded-skill", () => {
|
||||
test("embeds SKILL.md and reference files", () => {
|
||||
expect(EMBEDDED_SKILL_FILES["SKILL.md"]).toBeDefined();
|
||||
expect(EMBEDDED_SKILL_FILES["SKILL.md"]).toContain("name: seal-home");
|
||||
expect(EMBEDDED_SKILL_FILES["references/cli.md"]).toBeDefined();
|
||||
expect(getSkillContent()).toContain("name: seal-home");
|
||||
});
|
||||
|
||||
test("installSkillFiles writes all embedded files to target directory", () => {
|
||||
const tmp = mkdtempSync(join(tmpdir(), "skill-test-"));
|
||||
try {
|
||||
const res = installSkillFiles(tmp);
|
||||
expect(res.targetDir).toBe(tmp);
|
||||
expect(res.files.length).toBeGreaterThan(5);
|
||||
expect(existsSync(join(tmp, "SKILL.md"))).toBe(true);
|
||||
expect(existsSync(join(tmp, "references", "cli.md"))).toBe(true);
|
||||
} finally {
|
||||
rmSync(tmp, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user