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, rm, readFile, writeFile } from "node:fs/promises";
|
||||
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
||||
import { retryRm } from "../helpers/cleanup.ts";
|
||||
import { join } from "node:path";
|
||||
import { runInit } from "../../src/commands/init.ts";
|
||||
import { CommandError } from "../../src/cli/errors.ts";
|
||||
@@ -12,7 +13,7 @@ beforeEach(async () => {
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await rm(TMP_DIR, { recursive: true, force: true });
|
||||
await retryRm(TMP_DIR);
|
||||
});
|
||||
|
||||
describe("runInit", () => {
|
||||
|
||||
Reference in New Issue
Block a user