fixed format issues

This commit is contained in:
Boki 2025-06-26 16:12:27 -04:00
parent a700818a06
commit 08f713d98b
55 changed files with 5680 additions and 5533 deletions

View file

@ -1,37 +1,37 @@
import { describe, it, expect, beforeEach } from 'bun:test';
import { RedisCache } from '../src/redis-cache';
import type { CacheOptions } from '../src/types';
describe('RedisCache Simple', () => {
let cache: RedisCache;
beforeEach(() => {
const options: CacheOptions = {
keyPrefix: 'test:',
ttl: 3600,
redisConfig: { host: 'localhost', port: 6379 },
};
cache = new RedisCache(options);
});
describe('Core functionality', () => {
it('should create cache instance', () => {
expect(cache).toBeDefined();
expect(cache.isReady).toBeDefined();
expect(cache.get).toBeDefined();
expect(cache.set).toBeDefined();
});
it('should have stats tracking', () => {
const stats = cache.getStats();
expect(stats).toMatchObject({
hits: 0,
misses: 0,
errors: 0,
hitRate: 0,
total: 0,
});
expect(stats.uptime).toBeGreaterThanOrEqual(0);
});
});
});
import { beforeEach, describe, expect, it } from 'bun:test';
import { RedisCache } from '../src/redis-cache';
import type { CacheOptions } from '../src/types';
describe('RedisCache Simple', () => {
let cache: RedisCache;
beforeEach(() => {
const options: CacheOptions = {
keyPrefix: 'test:',
ttl: 3600,
redisConfig: { host: 'localhost', port: 6379 },
};
cache = new RedisCache(options);
});
describe('Core functionality', () => {
it('should create cache instance', () => {
expect(cache).toBeDefined();
expect(cache.isReady).toBeDefined();
expect(cache.get).toBeDefined();
expect(cache.set).toBeDefined();
});
it('should have stats tracking', () => {
const stats = cache.getStats();
expect(stats).toMatchObject({
hits: 0,
misses: 0,
errors: 0,
hitRate: 0,
total: 0,
});
expect(stats.uptime).toBeGreaterThanOrEqual(0);
});
});
});