mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-23 01:58:00 +00:00
tests: Fix test failing from other tests running.
This commit is contained in:
parent
5f603ac7b7
commit
b1801cb92a
1 changed files with 13 additions and 1 deletions
|
|
@ -102,7 +102,19 @@ vi.mock('../Logo.jsx', () => ({
|
|||
|
||||
// ── Utility mocks ─────────────────────────────────────────────────────────────
|
||||
vi.mock('../../../utils/forms/LiveGroupFilterUtils.js', () => ({
|
||||
abortTimers: vi.fn(),
|
||||
// Real cleanup so debounced regex-preview timers do not leak across tests.
|
||||
abortTimers: (timerRef, abortRef) => {
|
||||
Object.values(timerRef.current).forEach((t) => clearTimeout(t));
|
||||
timerRef.current = {};
|
||||
Object.values(abortRef.current).forEach((c) => {
|
||||
try {
|
||||
c.abort();
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
});
|
||||
abortRef.current = {};
|
||||
},
|
||||
computeAutoSyncStart: vi.fn(() => 101),
|
||||
getChannelsInRange: vi.fn().mockResolvedValue({ occupants: [] }),
|
||||
getEPGs: vi.fn().mockResolvedValue([]),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue