20 lines
424 B
TypeScript
20 lines
424 B
TypeScript
import { beforeAll, afterAll } from 'bun:test';
|
|
import { redis } from '@/services/redis.service';
|
|
|
|
beforeAll(async () => {
|
|
console.log('Setting up test environment...');
|
|
|
|
try {
|
|
await redis.connect();
|
|
} catch (error) {
|
|
console.warn('Redis not available in tests, continuing without cache');
|
|
}
|
|
});
|
|
|
|
afterAll(async () => {
|
|
console.log('Cleaning up test environment...');
|
|
|
|
await redis.disconnect();
|
|
});
|
|
|