feat: refactor tests and improve mocking for file-service and GitHub polling

- Updated mocking strategy for node:fs and node:fs/promises in file-service tests.
- Removed redundant test files and improved test implementations for better clarity.
- Enhanced GitHub polling service tests with rate limiter integration.
This commit is contained in:
gsxdsm
2026-04-01 22:44:44 -07:00
parent d39dd9a552
commit d14697e33d
18 changed files with 28 additions and 1142 deletions

View File

@@ -17,6 +17,8 @@ vi.mock("lucide-react", () => ({
Lightbulb: () => null,
ListTree: () => null,
Zap: () => null,
ChevronDown: () => null,
ChevronUp: () => null,
}));
// Mock the api module
@@ -28,6 +30,7 @@ vi.mock("../../api", () => ({
defaultPresetBySize: {},
}),
uploadAttachment: vi.fn(),
updateGlobalSettings: vi.fn(),
}));
const MOCK_MODELS: ModelInfo[] = [