use describe.each to test the multiple implementations

This commit is contained in:
2025-03-31 19:50:37 -07:00
parent a7ac9888f6
commit 7a5e1b8561
2 changed files with 17 additions and 27 deletions

View File

@@ -1,22 +0,0 @@
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();
})
});