From b1f06bf5f0844bbb1b9e5ea89296975cf70802c7 Mon Sep 17 00:00:00 2001 From: Grace Kind Date: Fri, 10 Jul 2026 19:25:01 -0500 Subject: [PATCH] Update unit tests --- tests/unit/specs/dataLayer/requests.test.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/unit/specs/dataLayer/requests.test.js b/tests/unit/specs/dataLayer/requests.test.js index 194c552e..d703beb2 100644 --- a/tests/unit/specs/dataLayer/requests.test.js +++ b/tests/unit/specs/dataLayer/requests.test.js @@ -1817,17 +1817,10 @@ t.describe("loadConvoMessages", (it) => { assertEquals(stored.messages[1].id, "m2"); }); - it("should null out cursor when validation second-page is empty", async () => { + it("should null out cursor when a page comes back empty with a cursor", async () => { const dataStore = new DataStore(); - let calls = 0; const mockApi = { - getMessages: async () => { - calls += 1; - if (calls === 1) { - return { messages: [{ id: "m1" }], cursor: "fakecursor" }; - } - return { messages: [], cursor: null }; - }, + getMessages: async () => ({ messages: [], cursor: "fakecursor" }), }; const requests = makeRequests(mockApi, dataStore); -- 2.51.2