updated event controllers and service event mtach tested

This commit is contained in:
2025-08-05 14:42:24 +03:00
parent aa8f0b8f31
commit 9232da69d3
57 changed files with 1699 additions and 180 deletions

View File

@@ -0,0 +1,30 @@
import { Test, TestingModule } from '@nestjs/testing';
import { CacheService } from './redis.service';
import Redis from 'ioredis';
import { REDIS_CLIENT } from './redis.constants';
describe('CacheService', () => {
let service: CacheService;
let mockRedisClient: Redis;
beforeEach(async () => {
// Create a mock Redis client
mockRedisClient = new Redis();
const module: TestingModule = await Test.createTestingModule({
providers: [
CacheService,
{
provide: REDIS_CLIENT,
useValue: mockRedisClient,
},
],
}).compile();
service = module.get<CacheService>(CacheService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});