From a1421d4360ee1b76ab15d1450f9fb16b6f498e26 Mon Sep 17 00:00:00 2001 From: Matthew Herod Date: Sat, 4 Jan 2025 18:39:35 +0000 Subject: [PATCH] test: update Firefox cookie discovery tests to use fast-glob --- .../FirefoxCookieQueryStrategy.discovery.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/browsers/firefox/__tests__/FirefoxCookieQueryStrategy.discovery.test.ts b/src/core/browsers/firefox/__tests__/FirefoxCookieQueryStrategy.discovery.test.ts index 666f78f..601d4e7 100644 --- a/src/core/browsers/firefox/__tests__/FirefoxCookieQueryStrategy.discovery.test.ts +++ b/src/core/browsers/firefox/__tests__/FirefoxCookieQueryStrategy.discovery.test.ts @@ -1,11 +1,11 @@ import { FirefoxCookieQueryStrategy } from "../FirefoxCookieQueryStrategy"; -// Mock the glob sync function -jest.mock("glob", () => ({ +// Mock fast-glob +jest.mock("fast-glob", () => ({ sync: jest.fn(), })); -interface MockGlob { +interface MockFastGlob { sync: jest.Mock; } @@ -24,7 +24,7 @@ describe("FirefoxCookieQueryStrategy - File Discovery", () => { }); it("should find cookie files in macOS paths", async () => { - const { sync } = jest.requireMock("glob"); + const { sync } = jest.requireMock("fast-glob"); sync.mockImplementation((pattern: string) => { if (pattern.includes("Library/Application Support/Firefox")) { return [ @@ -43,7 +43,7 @@ describe("FirefoxCookieQueryStrategy - File Discovery", () => { }); it("should find cookie files in Linux paths", async () => { - const { sync } = jest.requireMock("glob"); + const { sync } = jest.requireMock("fast-glob"); sync.mockImplementation((pattern: string) => { if (pattern.includes(".mozilla/firefox")) { return ["/mock/home/.mozilla/firefox/xyz789/cookies.sqlite"];