- Created comprehensive test suite for cache.ts covering: - set() and get() operations with various data types - TTL expiration logic (default, custom, and edge cases) - has() method for checking key existence - delete() method for removing individual keys - clear() method for removing all keys - Expiration boundary testing - Different TTL values for different items - TTL reset when items are overwritten - Fixed vitest.config.ts to include src/utils/** tests - Fixed tsconfig.json to include src/utils/** files - Used vi.useFakeTimers() for deterministic time-based testing - All tests properly isolated with beforeEach/afterEach hooks Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
40 lines
732 B
JSON
40 lines
732 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2017",
|
|
"lib": ["dom", "dom.iterable", "esnext"],
|
|
"allowJs": true,
|
|
"skipLibCheck": true,
|
|
"strict": true,
|
|
"noEmit": true,
|
|
"esModuleInterop": true,
|
|
"module": "esnext",
|
|
"moduleResolution": "bundler",
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"jsx": "preserve",
|
|
"incremental": true,
|
|
"plugins": [
|
|
{
|
|
"name": "next"
|
|
}
|
|
],
|
|
"paths": {
|
|
"@/*": ["./src/*"]
|
|
}
|
|
},
|
|
"include": [
|
|
"next-env.d.ts",
|
|
"**/*.ts",
|
|
"**/*.tsx",
|
|
".next/types/**/*.ts"
|
|
],
|
|
"exclude": [
|
|
"node_modules",
|
|
"src/components-vite",
|
|
"src/pages-vite",
|
|
"src/hooks",
|
|
"src/services",
|
|
"**/*.bak"
|
|
]
|
|
}
|