test(auth): align session update mocks

This commit is contained in:
Vincent Koc
2026-07-12 07:40:35 +08:00
committed by Vincent Koc
parent 6bba7eaa0d
commit 7edc4f11b6
+2 -2
View File
@@ -444,7 +444,7 @@ describe("handleLoginCommand", () => {
};
updateSessionStoreEntryMock.mockImplementationOnce(
async (params: { update: (entry: SessionEntry) => Partial<SessionEntry> | null }) => {
const patch = await params.update({ ...concurrentlySelectedEntry });
const patch = params.update({ ...concurrentlySelectedEntry });
return patch ? { ...concurrentlySelectedEntry, ...patch } : concurrentlySelectedEntry;
},
);
@@ -482,7 +482,7 @@ describe("handleLoginCommand", () => {
};
updateSessionStoreEntryMock.mockImplementationOnce(
async (params: { update: (entry: SessionEntry) => Partial<SessionEntry> | null }) => {
const patch = await params.update({ ...concurrentlySelectedEntry });
const patch = params.update({ ...concurrentlySelectedEntry });
return patch ? { ...concurrentlySelectedEntry, ...patch } : concurrentlySelectedEntry;
},
);