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
+7
View File
@@ -10,6 +10,13 @@ const mockRedis = {
};
jest.mock('../../src/utils/redis', () => ({
getRedisClient: () => mockRedis,
// Session 20 — provider gateway pulls cacheGet/cacheSet/isDegraded.
// Degraded mode lets every call through and skips Redis writes, so
// the existing axios-mock assertions stay accurate.
cacheGet: jest.fn(async () => null),
cacheSet: jest.fn(async () => true),
cacheDel: jest.fn(async () => true),
isDegraded: jest.fn(() => true),
}));
// Mock axios