fix: stabilize telegram media tests (#664) (thanks @azade-c)

This commit is contained in:
Peter Steinberger
2026-01-10 18:06:05 +01:00
parent 48ad3bbbe6
commit 464f0645a8
2 changed files with 10 additions and 1 deletions

View File

@@ -45,6 +45,14 @@ vi.mock("../config/config.js", async (importOriginal) => {
};
});
vi.mock("../config/sessions.js", async (importOriginal) => {
const actual = await importOriginal<typeof import("../config/sessions.js")>();
return {
...actual,
updateLastRoute: vi.fn(async () => undefined),
};
});
vi.mock("./pairing-store.js", () => ({
readTelegramAllowFromStore: vi.fn(async () => [] as string[]),
upsertTelegramPairingRequest: vi.fn(async () => ({
@@ -63,7 +71,7 @@ vi.mock("../auto-reply/reply.js", () => {
describe("telegram inbound media", () => {
const INBOUND_MEDIA_TEST_TIMEOUT_MS =
process.platform === "win32" ? 30_000 : 10_000;
process.platform === "win32" ? 30_000 : 20_000;
it(
"downloads media via file_path (no file.download)",