authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-03-01 19:18:46-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-03-01 22:36:35-08:00
loga574d9c936adcf0a8ccc9b10d8f65e0127d13adc
tree962af24013ea989103a4593e82ecc0693cab2e29
parent005e13089a4a8f44cb25452cb4b8d9b18184a1b7

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

1 files changed, 6 insertions(+), 2 deletions(-)

apps/web/src/composerDraftStore.test.ts+6-2
......@@ -282,10 +282,14 @@ describe("composerDraftStore project draft thread mapping", () => {
282282 branch: "main",
283283 worktreePath: "/tmp/main-worktree",
284284 });
285 store.setProjectDraftThreadId(projectId, threadId, {
285 const runtimeUndefinedOptions = {
286286 branch: undefined,
287287 worktreePath: undefined,
288 });
288 } as unknown as {
289 branch?: string | null;
290 worktreePath?: string | null;
291 };
292 store.setProjectDraftThreadId(projectId, threadId, runtimeUndefinedOptions);
289293
290294 expect(useComposerDraftStore.getState().getDraftThread(threadId)).toMatchObject({
291295 projectId,