test(nextcloud-talk): keep send runtime mock aligned

This commit is contained in:
Vincent Koc 2026-04-05 09:14:06 +01:00
parent 41e39eb46f
commit c6e117897f
1 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,7 @@ const hoisted = vi.hoisted(() => ({
convertMarkdownTables: vi.fn((text: string) => text),
record: vi.fn(),
resolveNextcloudTalkAccount: vi.fn(),
ssrfPolicyFromPrivateNetworkOptIn: vi.fn(() => undefined),
generateNextcloudTalkSignature: vi.fn(() => ({
random: "r",
signature: "s",
@ -26,6 +27,7 @@ vi.mock("./send.runtime.js", () => {
getNextcloudTalkRuntime: () => createSendCfgThreadingRuntime(hoisted),
resolveNextcloudTalkAccount: hoisted.resolveNextcloudTalkAccount,
resolveMarkdownTableMode: hoisted.resolveMarkdownTableMode,
ssrfPolicyFromPrivateNetworkOptIn: hoisted.ssrfPolicyFromPrivateNetworkOptIn,
};
});
@ -50,6 +52,7 @@ describe("nextcloud-talk send cfg threading", () => {
hoisted.resolveMarkdownTableMode.mockClear();
hoisted.convertMarkdownTables.mockClear();
hoisted.record.mockReset();
hoisted.ssrfPolicyFromPrivateNetworkOptIn.mockClear();
hoisted.generateNextcloudTalkSignature.mockClear();
hoisted.resolveNextcloudTalkAccount.mockReset();
hoisted.resolveNextcloudTalkAccount.mockReturnValue(defaultAccount);