mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 06:12:09 +01:00
- Add Zod validation schemas with strong password requirements (12+ chars, complexity) - Implement rate limiting for authentication endpoints (registration, password reset) - Remove duplicate MetricCard component, consolidate to ui/metric-card.tsx - Update README.md to use pnpm commands consistently - Enhance authentication security with 12-round bcrypt hashing - Add comprehensive input validation for all API endpoints - Fix security vulnerabilities in user registration and password reset flows 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
586 B
TypeScript
25 lines
586 B
TypeScript
// Vitest test setup
|
|
import { vi } from "vitest";
|
|
|
|
// Mock console methods to reduce noise in tests
|
|
global.console = {
|
|
...console,
|
|
log: vi.fn(),
|
|
warn: vi.fn(),
|
|
error: vi.fn(),
|
|
};
|
|
|
|
// Set test environment variables
|
|
process.env.NEXTAUTH_SECRET = "test-secret";
|
|
process.env.NEXTAUTH_URL = "http://localhost:3000";
|
|
|
|
// Use test database for all database operations during tests
|
|
if (process.env.DATABASE_URL_TEST) {
|
|
process.env.DATABASE_URL = process.env.DATABASE_URL_TEST;
|
|
}
|
|
|
|
// Mock node-fetch for transcript fetcher tests
|
|
vi.mock("node-fetch", () => ({
|
|
default: vi.fn(),
|
|
}));
|