Skip to content

Commit ff4e58f

Browse files
committed
fix(skills): update sync tests to reflect new RESERVED_LIFECYCLE_SLUGS
1 parent 2838e00 commit ff4e58f

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

scripts/__tests__/sync-plugin-skills.test.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ async function makeRepo(root: string) {
3131
join(pkgRoot, "a2ui-renderer/skills/a2ui-renderer/SKILL.md"),
3232
"---\nname: a2ui-renderer\n---\n# A2UI\n",
3333
);
34-
// Pre-existing lifecycle skill at the mirror root — must be left alone.
35-
await mkdir(join(root, "skills/0-to-working-chat"), { recursive: true });
34+
// Pre-existing standalone skill at the mirror root — must be left alone.
35+
await mkdir(join(root, "skills/copilotkit-setup"), { recursive: true });
3636
await writeFile(
37-
join(root, "skills/0-to-working-chat/SKILL.md"),
38-
"---\nname: 0-to-working-chat\n---\n# Lifecycle\n",
37+
join(root, "skills/copilotkit-setup/SKILL.md"),
38+
"---\nname: copilotkit-setup\n---\n# Setup\n",
3939
);
4040
}
4141

@@ -74,23 +74,23 @@ describe("syncPluginSkills", () => {
7474
expect(a2uiSkill).toBe("---\nname: a2ui-renderer\n---\n# A2UI\n");
7575
});
7676

77-
it("does not modify pre-existing lifecycle skills", async () => {
77+
it("does not modify pre-existing standalone skills", async () => {
7878
await makeRepo(repo);
7979
await syncPluginSkills({ cwd: repo, mode: "write" });
80-
const lifecycle = await readFile(
81-
join(repo, "skills/0-to-working-chat/SKILL.md"),
80+
const standalone = await readFile(
81+
join(repo, "skills/copilotkit-setup/SKILL.md"),
8282
"utf8",
8383
);
84-
expect(lifecycle).toBe("---\nname: 0-to-working-chat\n---\n# Lifecycle\n");
84+
expect(standalone).toBe("---\nname: copilotkit-setup\n---\n# Setup\n");
8585
});
8686

8787
it("errors with exit code 2 if a package skill collides with a reserved lifecycle slug", async () => {
8888
const pkgRoot = join(repo, "packages");
89-
await mkdir(join(pkgRoot, "rogue/skills/0-to-working-chat"), {
89+
await mkdir(join(pkgRoot, "rogue/skills/copilotkit-setup"), {
9090
recursive: true,
9191
});
9292
await writeFile(
93-
join(pkgRoot, "rogue/skills/0-to-working-chat/SKILL.md"),
93+
join(pkgRoot, "rogue/skills/copilotkit-setup/SKILL.md"),
9494
"collision\n",
9595
);
9696
const result = await syncPluginSkills({ cwd: repo, mode: "write" });
@@ -130,9 +130,9 @@ describe("syncPluginSkills", () => {
130130
});
131131

132132
it("exports the reserved lifecycle slug set", () => {
133-
expect(RESERVED_LIFECYCLE_SLUGS).toContain("0-to-working-chat");
134-
expect(RESERVED_LIFECYCLE_SLUGS).toContain("v1-to-v2-migration");
135-
expect(RESERVED_LIFECYCLE_SLUGS.size).toBe(6);
133+
expect(RESERVED_LIFECYCLE_SLUGS).toContain("copilotkit-setup");
134+
expect(RESERVED_LIFECYCLE_SLUGS).toContain("copilotkit-self-update");
135+
expect(RESERVED_LIFECYCLE_SLUGS.size).toBe(8);
136136
});
137137

138138
// Version sync — the plugin version tracks packages/runtime/package.json.

0 commit comments

Comments
 (0)