From b277078c4affd584e689b880040501bc35422589 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2026 16:31:07 +0000 Subject: [PATCH 1/2] chore(deps): bump ws from 8.18.3 to 8.21.1 Bumps [ws](https://github.com/websockets/ws) from 8.18.3 to 8.21.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.18.3...8.21.1) --- updated-dependencies: - dependency-name: ws dependency-version: 8.21.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 313a5cd..2dd0474 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6338,9 +6338,9 @@ } }, "node_modules/ws": { - "version": "8.18.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", - "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "version": "8.21.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.1.tgz", + "integrity": "sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==", "dev": true, "license": "MIT", "engines": { From e563a7ca0e97b89f8b2d2f58ea248feae806901f Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Thu, 16 Jul 2026 17:06:03 +0100 Subject: [PATCH 2/2] Fix Gemini summary expiry boundary test --- tests/gemini.test.js | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/tests/gemini.test.js b/tests/gemini.test.js index 3acca2f..9f8536f 100644 --- a/tests/gemini.test.js +++ b/tests/gemini.test.js @@ -1500,21 +1500,28 @@ describe("Gemini Component", () => { }); test("should handle clearExpiredSummary with exactly 24 hours", async () => { - const exactTimestamp = Date.now() - 86400 * 1000; + const now = Date.now(); + const dateNowSpy = jest.spyOn(Date, "now").mockReturnValue(now); - mockChromeStorage({ - summaryList: [{ name: "Place", clue: "" }], - timestamp: exactTimestamp, - favoriteList: [], - }); + try { + const exactTimestamp = now - 86400 * 1000; - geminiInstance.clearExpiredSummary(); + mockChromeStorage({ + summaryList: [{ name: "Place", clue: "" }], + timestamp: exactTimestamp, + favoriteList: [], + }); + + geminiInstance.clearExpiredSummary(); - // Wait for the async storage callback to complete - await flushPromises(); + // Wait for the async storage callback to complete + await flushPromises(); - // Should not clear (exactly 24 hours is still valid - elapsedTime > 86400 is false) - expect(state.hasSummary).toBe(true); + // Should not clear (exactly 24 hours is still valid - elapsedTime > 86400 is false) + expect(state.hasSummary).toBe(true); + } finally { + dateNowSpy.mockRestore(); + } }); test("should handle video summary requests", async () => {