fix: 替换所有测试文件的 rm 为 retryRm,修复 Windows EBUSY
This commit is contained in:
@@ -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 流程", () => {
|
||||
|
||||
Reference in New Issue
Block a user