test(telegram): force real timers for media groups
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { describe, expect, it, vi } from "vitest";
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
const useSpy = vi.fn();
|
const useSpy = vi.fn();
|
||||||
const middlewareUseSpy = vi.fn();
|
const middlewareUseSpy = vi.fn();
|
||||||
@@ -235,6 +235,11 @@ describe("telegram inbound media", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("telegram media groups", () => {
|
describe("telegram media groups", () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
// These tests rely on real setTimeout aggregation; guard against leaked fake timers.
|
||||||
|
vi.useRealTimers();
|
||||||
|
});
|
||||||
|
|
||||||
const MEDIA_GROUP_POLL_TIMEOUT_MS =
|
const MEDIA_GROUP_POLL_TIMEOUT_MS =
|
||||||
process.platform === "win32" ? 30_000 : 15_000;
|
process.platform === "win32" ? 30_000 : 15_000;
|
||||||
const MEDIA_GROUP_TEST_TIMEOUT_MS =
|
const MEDIA_GROUP_TEST_TIMEOUT_MS =
|
||||||
|
|||||||
Reference in New Issue
Block a user