1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-15 07:54:55 +00:00
This commit is contained in:
Alex
2026-01-12 11:33:36 -05:00
parent c36c96d552
commit 72639f270c

View File

@@ -113,7 +113,7 @@ describe("PhishingDataService", () => {
expect(result!.applicationVersion).toBe("2.0.0");
});
it("only updates timestamp if checksum matches", async () => {
it("returns null if checksum matches to skip state update", async () => {
const prev: PhishingData = {
webAddresses: ["a.com"],
timestamp: Date.now() - 60000,
@@ -122,9 +122,7 @@ describe("PhishingDataService", () => {
};
fetchChecksumSpy.mockResolvedValue("abc");
const result = await service.getNextWebAddresses(prev);
expect(result!.webAddresses).toEqual(prev.webAddresses);
expect(result!.checksum).toBe("abc");
expect(result!.timestamp).not.toBe(prev.timestamp);
expect(result).toBeNull();
});
it("patches daily domains if cache is fresh", async () => {