Skip to content

Commit 75fe786

Browse files
committed
fix(tests): stub every session/messages export in the content-controller mocks
1 parent 76c1c58 commit 75fe786

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/audit-scraping/content-controller.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,23 @@ mock.module("../../features/audit-scraping/audit-runner", () => ({
3737
ranAudits.push(custom);
3838
},
3939
}));
40+
4041
mock.module("../../features/session/session", () => ({
4142
recordLoginStateFromPage: () => {
4243
recordedLoginPages++;
4344
},
45+
getCachedLoginState: async () => true,
46+
openLoginTab: async () => {},
47+
registerSessionCookieWatcher: () => {},
4448
}));
4549
mock.module("../../lib/browser/messages", () => ({
4650
sendMessageResponse: (
4751
_request: ExtensionMessage,
4852
sendResponse: (response: unknown) => void,
4953
response: unknown,
5054
) => sendResponse(response),
55+
sendRuntimeMessage: async () => undefined,
56+
sendTabMessage: async () => undefined,
5157
}));
5258

5359
(

0 commit comments

Comments
 (0)