Session 7d: Audit fixes - rate limiting, error leak, parallel parlays, analyze cache, bundle analyzer
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
const request = require('supertest');
|
||||
|
||||
// Mock Redis
|
||||
// Mock Redis — covers both the legacy `getRedisClient()` surface and
|
||||
// the cacheGet/cacheSet helpers added in Session 6c (used by /api/analyze
|
||||
// cache from Session 7d).
|
||||
const mockRedis = {
|
||||
get: jest.fn(),
|
||||
set: jest.fn(),
|
||||
@@ -10,6 +12,10 @@ const mockRedis = {
|
||||
};
|
||||
jest.mock('../../src/utils/redis', () => ({
|
||||
getRedisClient: () => mockRedis,
|
||||
cacheGet: async () => null,
|
||||
cacheSet: async () => true,
|
||||
cacheDel: async () => true,
|
||||
isDegraded: () => false,
|
||||
}));
|
||||
|
||||
// Mock axios (used by both oddsService and nbaStatsClient)
|
||||
|
||||
Reference in New Issue
Block a user