13 lines
574 B
TypeScript
13 lines
574 B
TypeScript
// Runs in the worker before any test file is imported.
|
|
// Must be set before src/config.ts (dotenv) and the Prisma client read env.
|
|
import os from 'node:os';
|
|
import path from 'node:path';
|
|
|
|
process.env.NODE_ENV = 'test';
|
|
process.env.DATABASE_URL = 'postgresql://fitos:fitos@localhost:5432/fitos_test';
|
|
process.env.JWT_ACCESS_SECRET = 'test-access-secret';
|
|
process.env.JWT_REFRESH_SECRET = 'test-refresh-secret';
|
|
process.env.LOG_LEVEL = 'silent';
|
|
process.env.FITOS_FIRST_ADMIN_EMAIL = '';
|
|
process.env.UPLOAD_DIR = path.join(os.tmpdir(), `fitos-test-uploads-${process.pid}`);
|