fix: 替换所有测试文件的 rm 为 retryRm,修复 Windows EBUSY

This commit is contained in:
2026-06-11 23:38:02 +08:00
parent 3cac492e78
commit 15ad256d1e
10 changed files with 82 additions and 121 deletions

View File

@@ -1,6 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from "bun:test";
import { existsSync } from "node:fs";
import { mkdir, writeFile, rm, rename } from "node:fs/promises";
import { mkdir, writeFile, rename } from "node:fs/promises";
import { retryRm } from "../helpers/cleanup.ts";
import { join } from "node:path";
import { runInit } from "../../src/commands/init.ts";
import { loadConfig, getChangeDir, getArchiveDir } from "../../src/core/config.ts";
@@ -20,7 +21,7 @@ beforeEach(async () => {
});
afterEach(async () => {
await rm(TMP_DIR, { recursive: true, force: true });
await retryRm(TMP_DIR);
});
describe("完整 SDD 流程", () => {