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

@@ -82,9 +82,7 @@ describe("injectClaudeCode", () => {
describe("updateClaudeCode", () => {
it("文件不存在时创建", async () => {
await updateClaudeCode(TMP_DIR);
expect(
existsSync(join(TMP_DIR, ".claude", "commands", "rune-discuss.md")),
).toBe(true);
expect(existsSync(join(TMP_DIR, ".claude", "commands", "rune-discuss.md"))).toBe(true);
});
it("文件存在且内容一致时不覆盖", async () => {
@@ -104,10 +102,7 @@ describe("updateClaudeCode", () => {
it("文件存在但内容不一致时覆盖", async () => {
await injectClaudeCode(TMP_DIR);
await writeFile(
join(TMP_DIR, ".claude", "commands", "rune-discuss.md"),
"旧内容",
);
await writeFile(join(TMP_DIR, ".claude", "commands", "rune-discuss.md"), "旧内容");
await updateClaudeCode(TMP_DIR);
const content = await readFile(
@@ -120,8 +115,6 @@ describe("updateClaudeCode", () => {
it("更新 status 命令", async () => {
await updateClaudeCode(TMP_DIR);
expect(
existsSync(join(TMP_DIR, ".claude", "commands", "rune-status.md")),
).toBe(true);
expect(existsSync(join(TMP_DIR, ".claude", "commands", "rune-status.md"))).toBe(true);
});
});