test(worktree): let timed-out fetch fixtures release Windows locks

Windows CI fails temporary-repository removal after the silent-remote
assertions. Await bounded asynchronous filesystem cleanup so pending
process-close work can run, preserving every worktree assertion.

Refs #6679. This reuses the fixture correction verified in #6674.
This commit is contained in:
paseo-bot[bot]
2026-10-13 06:17:40 +02:00
parent 2133e10a53
commit d92eb60e3d
+3 -2
View File
@@ -10,6 +10,7 @@ import {
type WorktreeConfig,
} from "./worktree";
import { execFileSync } from "child_process";
import { rm } from "node:fs/promises";
import {
mkdtempSync,
mkdirSync,
@@ -89,8 +90,8 @@ describe("paseo worktree manager", () => {
});
});
afterEach(() => {
rmSync(tempDir, { recursive: true, force: true });
afterEach(async () => {
await rm(tempDir, { recursive: true, force: true, maxRetries: 10, retryDelay: 100 });
});
it("treats a worktree as paseo-owned even when its .git admin is missing", async () => {