From a574d9c936adcf0a8ccc9b10d8f65e0127d13adc Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sun, 1 Mar 2026 19:18:46 -0800 Subject: [PATCH] Cover runtime undefined draft thread options in store test - Build options object with runtime `undefined` values via cast - Pass object into `setProjectDraftThreadId` to verify handling path --- apps/web/src/composerDraftStore.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/web/src/composerDraftStore.test.ts b/apps/web/src/composerDraftStore.test.ts index c2dd5c1240b706f0634df523c6c2d6e02aaae061..c994fcb79f78fbee0fcc09efd2568ad2bca124d6 100644 --- a/apps/web/src/composerDraftStore.test.ts +++ b/apps/web/src/composerDraftStore.test.ts @@ -282,10 +282,14 @@ describe("composerDraftStore project draft thread mapping", () => { branch: "main", worktreePath: "/tmp/main-worktree", }); - store.setProjectDraftThreadId(projectId, threadId, { + const runtimeUndefinedOptions = { branch: undefined, worktreePath: undefined, - }); + } as unknown as { + branch?: string | null; + worktreePath?: string | null; + }; + store.setProjectDraftThreadId(projectId, threadId, runtimeUndefinedOptions); expect(useComposerDraftStore.getState().getDraftThread(threadId)).toMatchObject({ projectId, -- 2.54.0