mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
23 lines
637 B
TypeScript
23 lines
637 B
TypeScript
import { afterEach, beforeEach, describe } from "@jest/globals";
|
|
import { createClient, RedisClientType } from "redis";
|
|
import { RedisNotificationRepository } from "../../src/repositories/RedisNotificationRepository";
|
|
|
|
describe("RedisNotificationRepository", () => {
|
|
let redisClient: RedisClientType;
|
|
let repository: RedisNotificationRepository;
|
|
|
|
beforeEach(async () => {
|
|
redisClient = createClient({
|
|
url: process.env.REDIS_URL,
|
|
});
|
|
repository = new RedisNotificationRepository(
|
|
redisClient
|
|
);
|
|
await repository.connect();
|
|
});
|
|
|
|
afterEach(async () => {
|
|
await repository.disconnect();
|
|
})
|
|
});
|