This commit is contained in:
Carl-Gerhard Lindesvärd
2026-03-23 21:37:12 +01:00
parent 20665789e1
commit 8dd3966f31
5 changed files with 473 additions and 297 deletions

View File

@@ -8,7 +8,10 @@ describe('cachable', () => {
beforeEach(async () => {
redis = getRedisCache();
// Clear any existing cache data for clean tests
const keys = await redis.keys('cachable:*');
const keys = [
...await redis.keys('cachable:*'),
...await redis.keys('test-key*'),
];
if (keys.length > 0) {
await redis.del(...keys);
}
@@ -16,7 +19,10 @@ describe('cachable', () => {
afterEach(async () => {
// Clean up after each test
const keys = await redis.keys('cachable:*');
const keys = [
...await redis.keys('cachable:*'),
...await redis.keys('test-key*'),
];
if (keys.length > 0) {
await redis.del(...keys);
}