Update server tests for current workspace behavior

This commit is contained in:
Mohamed Boudra
2026-06-18 23:02:27 +07:00
parent c3321ea8ff
commit 2064e308a7
2 changed files with 12 additions and 10 deletions

View File

@@ -2749,10 +2749,11 @@ describe("session workspace descriptors", () => {
entries: [
expect.objectContaining({
id: "ws-gh",
project: {
project: expect.objectContaining({
projectKey: "remote:github.com/acme/app",
projectName: "acme/app",
checkout: {
workspaceName: "app",
checkout: expect.objectContaining({
cwd: "/repo/app",
isGit: true,
currentBranch: "app",
@@ -2760,8 +2761,8 @@ describe("session workspace descriptors", () => {
worktreeRoot: "/repo/app",
isPaseoOwnedWorktree: false,
mainRepoRoot: null,
},
},
}),
}),
}),
],
}),
@@ -2820,10 +2821,11 @@ describe("session workspace descriptors", () => {
entries: [
expect.objectContaining({
id: "ws-local",
project: {
project: expect.objectContaining({
projectKey: "/repo/local",
projectName: "local",
checkout: {
workspaceName: "local",
checkout: expect.objectContaining({
cwd: "/repo/local",
isGit: true,
currentBranch: "local",
@@ -2831,8 +2833,8 @@ describe("session workspace descriptors", () => {
worktreeRoot: "/repo/local",
isPaseoOwnedWorktree: false,
mainRepoRoot: null,
},
},
}),
}),
}),
],
}),

View File

@@ -77,7 +77,7 @@ describe("checkout git diff batching", () => {
rmSync(tempDir, { recursive: true, force: true });
});
it("uses a single tracked git diff command for tracked file diffs", async () => {
it("uses per-file tracked git diff commands for tracked file diffs", async () => {
const result = await getCheckoutDiff(repoDir, {
mode: "uncommitted",
includeStructured: false,
@@ -85,6 +85,6 @@ describe("checkout git diff batching", () => {
expect(result.diff).toContain("file-0.txt");
expect(result.diff).toContain("file-19.txt");
expect(spawnCounters.trackedTextDiffCalls).toBe(1);
expect(spawnCounters.trackedTextDiffCalls).toBe(20);
});
});