chore: 添加 .oxfmtrc.json 并格式化全部代码

This commit is contained in:
2026-06-09 14:22:33 +08:00
parent ebd5bb4051
commit b82f1caf0b
23 changed files with 209 additions and 373 deletions

View File

@@ -22,10 +22,7 @@ describe("runInit", () => {
expect(existsSync(join(TMP_DIR, ".rune"))).toBe(true);
expect(existsSync(join(TMP_DIR, ".rune", "config.yaml"))).toBe(true);
const content = await readFile(
join(TMP_DIR, ".rune", "config.yaml"),
"utf-8",
);
const content = await readFile(join(TMP_DIR, ".rune", "config.yaml"), "utf-8");
expect(content).toContain("# Rune 配置文件");
expect(content).toContain("stages:");
});
@@ -46,16 +43,10 @@ describe("runInit", () => {
it("重复 init 不覆盖 config.yaml", async () => {
await runInit(TMP_DIR, ["opencode"]);
await writeFile(
join(TMP_DIR, ".rune", "config.yaml"),
"自定义内容",
);
await writeFile(join(TMP_DIR, ".rune", "config.yaml"), "自定义内容");
await runInit(TMP_DIR, ["opencode"]);
const content = await readFile(
join(TMP_DIR, ".rune", "config.yaml"),
"utf-8",
);
const content = await readFile(join(TMP_DIR, ".rune", "config.yaml"), "utf-8");
expect(content).toBe("自定义内容");
});