fix(server): align tests with SSH alias resolver and Windows rm flake
- session.test.ts: drop stale 4th workspaceGitService arg from
createPullRequest assertion (signature changed in ee5a23d9).
- workspace-git-service.test.ts: bump local flushPromises microtask
count to cover the extra await resolveGitHubRemoteForTarget step
added by the GitHub remote resolver.
- provider-windows-launch.test.ts: retry rmSync in afterEach to
ride out Windows file locks from the spawned claude.cmd.
This commit is contained in:
@@ -141,7 +141,7 @@ function withPathEntry<T>(dir: string, run: () => Promise<T>): Promise<T> {
|
|||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
for (const dir of tempDirs.splice(0)) {
|
for (const dir of tempDirs.splice(0)) {
|
||||||
rmSync(dir, { recursive: true, force: true });
|
rmSync(dir, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1180,9 +1180,6 @@ describe("session checkout pull request creation", () => {
|
|||||||
base: "main",
|
base: "main",
|
||||||
},
|
},
|
||||||
expect.anything(),
|
expect.anything(),
|
||||||
expect.objectContaining({
|
|
||||||
getCheckoutDiff: workspaceGitService.getCheckoutDiff,
|
|
||||||
}),
|
|
||||||
);
|
);
|
||||||
expect(messages).toContainEqual({
|
expect(messages).toContainEqual({
|
||||||
type: "checkout_pr_create_response",
|
type: "checkout_pr_create_response",
|
||||||
|
|||||||
@@ -136,8 +136,9 @@ function createDirent(name: string, isDirectory: boolean) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function flushPromises(): Promise<void> {
|
async function flushPromises(): Promise<void> {
|
||||||
await Promise.resolve();
|
for (let i = 0; i < 6; i++) {
|
||||||
await Promise.resolve();
|
await Promise.resolve();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function createDeferred<T>() {
|
function createDeferred<T>() {
|
||||||
|
|||||||
Reference in New Issue
Block a user