Files
dbis_core/src/__tests__/setup.ts
defiQUG 6ebf71dda8 feat: SolaceNet gateway rails, IRU marketplace hardening, and docs
- Gateway adapter registry, rails routes, optional SOLACENET_GATEWAY_RAILS_ENFORCE; HTTP integration tests.
- IRU marketplace: rate limits, public routes, notifications/SMTP env docs; marketplace UI constants and flows.
- Quantum proxy legacy protocol types; debank/tezos/GSDS touch-ups; .env.example operator notes.
- SolaceNet doc set (gaps, runbooks, telecom schema example).

Tests: npm run test:iru-marketplace, npm run test:gateway (pass).
Note: full-repo tsc still reports unrelated legacy errors outside this change set.
Made-with: Cursor
2026-04-07 23:21:55 -07:00

21 lines
616 B
TypeScript

// Jest test setup
// Runs before all tests
import prisma from '@/shared/database/prisma';
// Set test environment
process.env.NODE_ENV = 'test';
process.env.DATABASE_URL = process.env.TEST_DATABASE_URL || 'postgresql://test:test@localhost:5432/dbis_test';
process.env.JWT_SECRET = 'test-jwt-secret-minimum-32-characters-long-for-testing';
process.env.ALLOWED_ORIGINS = 'http://localhost:3000';
process.env.LOG_LEVEL = 'error'; // Reduce log noise in tests
// Global test timeout
jest.setTimeout(10000);
// Cleanup after all tests
afterAll(async () => {
await prisma.$disconnect().catch(() => undefined);
});