docs: config.yaml 模板移除 {{change-name}},增加 metadata 说明和 create 阶段

This commit is contained in:
2026-06-10 13:08:47 +08:00
parent ed4da9b6a0
commit cb537b4f2a
2 changed files with 30 additions and 3 deletions

View File

@@ -67,4 +67,26 @@ describe("runInit", () => {
expect(content).toContain("metadata:");
expect(content).toContain("command:");
});
it("config.yaml 模板不含 {{change-name}}", async () => {
await runInit(TMP_DIR, ["opencode"]);
const content = await readFile(join(TMP_DIR, ".rune", "config.yaml"), "utf-8");
expect(content).not.toContain("{{change-name}}");
});
it("config.yaml 模板包含 metadata 说明", async () => {
await runInit(TMP_DIR, ["opencode"]);
const content = await readFile(join(TMP_DIR, ".rune", "config.yaml"), "utf-8");
expect(content).toContain("metadata");
expect(content).toContain("tracked");
});
it("config.yaml 模板包含 create 阶段", async () => {
await runInit(TMP_DIR, ["opencode"]);
const content = await readFile(join(TMP_DIR, ".rune", "config.yaml"), "utf-8");
expect(content).toContain("create");
});
});