feat/tests #5
19
apps/backend/src/tests/setup.ts
Normal file
19
apps/backend/src/tests/setup.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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();
|
||||||
|
});
|
||||||
|
|
||||||
Reference in New Issue
Block a user