Session 20: Provider intelligence — quota tracker, gateway with fallback cascade, admin quota dashboard (1476 tests)

This commit is contained in:
Kev
2026-06-12 00:54:39 -04:00
parent 56392ec8f4
commit 9b10bb4138
17 changed files with 1422 additions and 15 deletions
+9
View File
@@ -10,6 +10,15 @@ const mockRedis = {
};
jest.mock('../../src/utils/redis', () => ({
getRedisClient: () => mockRedis,
// Session 20 — the provider gateway + quotaTracker pull from
// cacheGet/cacheSet/isDegraded. We surface them as degraded-mode
// no-ops here so the gateway fails OPEN in tests (lets every call
// through without touching Redis), which preserves the legacy
// axios-mock-driven assertions in this file.
cacheGet: jest.fn(async () => null),
cacheSet: jest.fn(async () => true),
cacheDel: jest.fn(async () => true),
isDegraded: jest.fn(() => true),
}));
// Mock axios