Session 20: Provider intelligence — quota tracker, gateway with fallback cascade, admin quota dashboard (1476 tests)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user