summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/context/global-sync.test.ts
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-02-18 11:02:41 -0600
committerAdam <[email protected]>2026-02-18 11:48:25 -0600
commitef14f64f9ee10ee7945a547bde4b13d6dcf2f0bd (patch)
tree56e755687a04ded0c7c6469ad96836331e88dd94 /packages/app/src/context/global-sync.test.ts
parent3f60a6c2a46dab1622ee4f4c99e4dfad876f3a3c (diff)
downloadopencode-ef14f64f9ee10ee7945a547bde4b13d6dcf2f0bd.tar.gz
opencode-ef14f64f9ee10ee7945a547bde4b13d6dcf2f0bd.zip
chore: cleanup
Diffstat (limited to 'packages/app/src/context/global-sync.test.ts')
-rw-r--r--packages/app/src/context/global-sync.test.ts10
1 files changed, 0 insertions, 10 deletions
diff --git a/packages/app/src/context/global-sync.test.ts b/packages/app/src/context/global-sync.test.ts
index 396b41231..7956057fd 100644
--- a/packages/app/src/context/global-sync.test.ts
+++ b/packages/app/src/context/global-sync.test.ts
@@ -30,7 +30,6 @@ describe("pickDirectoriesToEvict", () => {
describe("loadRootSessionsWithFallback", () => {
test("uses limited roots query when supported", async () => {
const calls: Array<{ directory: string; roots: true; limit?: number }> = []
- let fallback = 0
const result = await loadRootSessionsWithFallback({
directory: "dir",
@@ -39,20 +38,15 @@ describe("loadRootSessionsWithFallback", () => {
calls.push(query)
return { data: [] }
},
- onFallback: () => {
- fallback += 1
- },
})
expect(result.data).toEqual([])
expect(result.limited).toBe(true)
expect(calls).toEqual([{ directory: "dir", roots: true, limit: 10 }])
- expect(fallback).toBe(0)
})
test("falls back to full roots query on limited-query failure", async () => {
const calls: Array<{ directory: string; roots: true; limit?: number }> = []
- let fallback = 0
const result = await loadRootSessionsWithFallback({
directory: "dir",
@@ -62,9 +56,6 @@ describe("loadRootSessionsWithFallback", () => {
if (query.limit) throw new Error("unsupported")
return { data: [] }
},
- onFallback: () => {
- fallback += 1
- },
})
expect(result.data).toEqual([])
@@ -73,7 +64,6 @@ describe("loadRootSessionsWithFallback", () => {
{ directory: "dir", roots: true, limit: 25 },
{ directory: "dir", roots: true },
])
- expect(fallback).toBe(1)
})
})