• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 18093701040

29 Sep 2025 10:21AM UTC coverage: 89.049% (-0.03%) from 89.081%
18093701040

Pull #2717

github

web-flow
Merge 52dfb1197 into 424138613
Pull Request #2717: Feat: Add HTTP caching headers based on Redis TTL

3771 of 4661 branches covered (80.91%)

Branch coverage included in aggregate %.

52 of 70 new or added lines in 8 files covered. (74.29%)

16 existing lines in 4 files now uncovered.

12646 of 13775 relevant lines covered (91.8%)

527.19 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.89
/src/datasources/cache/__tests__/test.cache.module.ts
1
import { Global, Module } from '@nestjs/common';
110✔
2
import { FakeCacheService } from '@/datasources/cache/__tests__/fake.cache.service';
110✔
3
import { CacheReadiness } from '@/domain/interfaces/cache-readiness.interface';
110✔
4
import { CacheService } from '@/datasources/cache/cache.service.interface';
110✔
5
import { ResponseCacheService } from '@/datasources/cache/response-cache.service';
110✔
6

7
const responseCacheServiceStub: Pick<
8
  ResponseCacheService,
9
  'trackTtl' | 'getTtl'
10
> = {
110✔
NEW
11
  trackTtl: (): void => undefined,
×
12
  getTtl: (): number | undefined => undefined,
1,508✔
13
};
14

15
/**
16
 * The {@link TestCacheModule} should be used whenever you want to
17
 * override the values provided by the {@link CacheService}
18
 *
19
 * Example:
20
 * Test.createTestingModule({ imports: [ModuleA, TestCacheModule]}).compile();
21
 *
22
 * This will create a TestModule which uses the implementation of ModuleA but
23
 * overrides the real Cache Module with a fake one – {@link FakeCacheService}
24
 */
25
@Global()
26
@Module({
27
  providers: [
28
    { provide: CacheService, useClass: FakeCacheService },
29
    {
30
      provide: CacheReadiness,
31
      useExisting: CacheService,
32
    },
33
    {
34
      provide: ResponseCacheService,
35
      useValue: responseCacheServiceStub,
36
    },
37
  ],
38
  exports: [CacheService, CacheReadiness, ResponseCacheService],
39
})
40
export class TestCacheModule {}
110✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc