diff options
| author | Shoubhit Dash <[email protected]> | 2026-03-25 21:09:53 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-25 21:09:53 +0530 |
| commit | 73e107250dd44afef244021694a3343d2cc9715a (patch) | |
| tree | 2b8fb6b810a1bc12fe06d1663dcdae1409670ba8 /packages/app/src/context/global-sync/event-reducer.test.ts | |
| parent | b746aec49316d8f83d40aa34fa55bf7cff81c036 (diff) | |
| download | opencode-73e107250dd44afef244021694a3343d2cc9715a.tar.gz opencode-73e107250dd44afef244021694a3343d2cc9715a.zip | |
feat: restore git-backed review modes with effectful git service (#18900)
Diffstat (limited to 'packages/app/src/context/global-sync/event-reducer.test.ts')
| -rw-r--r-- | packages/app/src/context/global-sync/event-reducer.test.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/app/src/context/global-sync/event-reducer.test.ts b/packages/app/src/context/global-sync/event-reducer.test.ts index cf2da135c..892129788 100644 --- a/packages/app/src/context/global-sync/event-reducer.test.ts +++ b/packages/app/src/context/global-sync/event-reducer.test.ts @@ -494,8 +494,10 @@ describe("applyDirectoryEvent", () => { }) test("updates vcs branch in store and cache", () => { - const [store, setStore] = createStore(baseState()) - const [cacheStore, setCacheStore] = createStore({ value: undefined as State["vcs"] }) + const [store, setStore] = createStore(baseState({ vcs: { branch: "main", default_branch: "main" } })) + const [cacheStore, setCacheStore] = createStore({ + value: { branch: "main", default_branch: "main" } as State["vcs"], + }) applyDirectoryEvent({ event: { type: "vcs.branch.updated", properties: { branch: "feature/test" } }, @@ -511,8 +513,8 @@ describe("applyDirectoryEvent", () => { }, }) - expect(store.vcs).toEqual({ branch: "feature/test" }) - expect(cacheStore.value).toEqual({ branch: "feature/test" }) + expect(store.vcs).toEqual({ branch: "feature/test", default_branch: "main" }) + expect(cacheStore.value).toEqual({ branch: "feature/test", default_branch: "main" }) }) test("routes disposal and lsp events to side-effect handlers", () => { |
