Files
livedash-node/tests/setup.ts
Max Kowalski 5c1ced5900 feat: add rawTranscriptContent field to SessionImport model
feat: enhance server initialization with environment validation and import processing scheduler

test: add Jest setup for unit tests and mock console methods

test: implement unit tests for environment management and validation

test: create unit tests for transcript fetcher functionality
2025-06-27 19:00:22 +02:00

26 lines
571 B
TypeScript

// Jest test setup
import { jest } from '@jest/globals';
// Mock console methods to reduce noise in tests
global.console = {
...console,
log: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
};
// Set test environment variables
Object.defineProperty(process.env, 'NODE_ENV', {
value: 'test',
writable: true,
configurable: true,
});
process.env.NEXTAUTH_SECRET = 'test-secret';
process.env.NEXTAUTH_URL = 'http://localhost:3000';
// Mock node-fetch for transcript fetcher tests
jest.mock('node-fetch', () => ({
__esModule: true,
default: jest.fn(),
}));