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
This commit is contained in:
1 parent
39fd14b73e
commit
7c0b8bee70
1 file changed
+6
-2
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user