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