mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-20 16:51:10 +00:00
fix(tests): mock API module in EPG test to prevent real HTTP requests
This commit is contained in:
parent
cc41ab613f
commit
b236c965eb
1 changed files with 9 additions and 0 deletions
|
|
@ -2,6 +2,15 @@ import { render, screen, fireEvent, waitFor } from '@testing-library/react';
|
|||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
|
||||
// ── Utility mocks ──────────────────────────────────────────────────────────────
|
||||
vi.mock('../../api.js', () => ({
|
||||
default: {
|
||||
getSDLineups: vi.fn().mockResolvedValue([]),
|
||||
addSDLineup: vi.fn().mockResolvedValue({ success: true }),
|
||||
deleteSDLineup: vi.fn().mockResolvedValue({ success: true }),
|
||||
searchSDLineups: vi.fn().mockResolvedValue([]),
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock('../../../utils/notificationUtils.js', () => ({
|
||||
showNotification: vi.fn(),
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue