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,5 +1,6 @@
import { describe, it, expect, beforeEach, afterEach } from "bun:test";
import { mkdir, writeFile, rm } from "node:fs/promises";
import { mkdir, writeFile } from "node:fs/promises";
import { retryRm } from "../helpers/cleanup.ts";
import { join } from "node:path";
import {
assembleDiscussPrompt,
@@ -18,7 +19,7 @@ beforeEach(async () => {
});
afterEach(async () => {
await rm(TMP_DIR, { recursive: true, force: true });
await retryRm(TMP_DIR);
});
describe("assembleDiscussPrompt", () => {