Files
livedash-node/tests/setup.ts
Max Kowalski 49a75f5ede Migrate tests from Jest to Vitest, updating setup and test files accordingly.
- Replace Jest imports and mocks with Vitest equivalents in setup and unit tests.
- Adjust test cases to use async imports and reset modules with Vitest.
- Add Vitest configuration file for test environment setup and coverage reporting.
2025-06-27 19:14:05 +02:00

20 lines
424 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';
// Mock node-fetch for transcript fetcher tests
vi.mock('node-fetch', () => ({
default: vi.fn(),
}));