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
This commit is contained in:
Max Kowalski
2025-06-27 19:00:22 +02:00
parent 50b230aa9b
commit 5c1ced5900
25 changed files with 3492 additions and 82 deletions

25
tests/setup.ts Normal file
View File

@ -0,0 +1,25 @@
// 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(),
}));