1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-18 18:33:50 +00:00

Fix skipped memory storage tests (#18168)

This commit fixes the tests that were skipped as part of #17245.
This commit is contained in:
Derek Nance
2026-01-05 04:12:31 -06:00
committed by jaasen-livefront
parent ad5f1804d2
commit 065639998f
2 changed files with 6 additions and 4 deletions

View File

@@ -12,7 +12,10 @@ export function mockPorts() {
(chrome.runtime.connect as jest.Mock).mockImplementation((portInfo) => {
const port = mockDeep<chrome.runtime.Port>();
port.name = portInfo.name;
port.sender = { url: chrome.runtime.getURL("") };
port.sender = {
url: chrome.runtime.getURL(""),
origin: chrome.runtime.getURL(""),
};
// convert to internal port
delete (port as any).tab;

View File

@@ -13,8 +13,7 @@ import { mockPorts } from "../../../spec/mock-port.spec-util";
import { BackgroundMemoryStorageService } from "./background-memory-storage.service";
import { ForegroundMemoryStorageService } from "./foreground-memory-storage.service";
// These are succeeding individually but failing in a batch run - skipping for now
describe.skip("foreground background memory storage interaction", () => {
describe("foreground background memory storage interaction", () => {
let foreground: ForegroundMemoryStorageService;
let background: BackgroundMemoryStorageService;
let logService: MockProxy<LogService>;
@@ -28,7 +27,7 @@ describe.skip("foreground background memory storage interaction", () => {
});
afterEach(() => {
jest.resetAllMocks();
jest.clearAllMocks();
});
test.each(["has", "get"])(