23 lines
975 B
TypeScript
23 lines
975 B
TypeScript
|
|
// Vitest setup: set required env vars before test modules are loaded.
|
||
|
|
// env.ts checks these at module load time; they must be present when
|
||
|
|
// actions.ts / mailer.ts / etc. are imported.
|
||
|
|
import { mkdirSync } from 'fs'
|
||
|
|
|
||
|
|
const dataDir = 'test-data-unit'
|
||
|
|
mkdirSync(dataDir, { recursive: true })
|
||
|
|
|
||
|
|
process.env.MAILSHIP_URL = 'http://localhost:3000'
|
||
|
|
process.env.MAILSHIP_NAME = 'Test Mailship'
|
||
|
|
process.env.MAILSHIP_SECRET = '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'
|
||
|
|
process.env.SMTP_HOST = 'localhost'
|
||
|
|
process.env.SMTP_PORT = '587'
|
||
|
|
process.env.SMTP_USER = 'test@test.com'
|
||
|
|
process.env.SMTP_PASSWORD = 'test'
|
||
|
|
process.env.SMTP_FROM = 'test@test.com'
|
||
|
|
process.env.DEFAULT_RELAYS = 'wss://relay.damus.io'
|
||
|
|
process.env.INDEXER_RELAYS = 'wss://purplepag.es'
|
||
|
|
process.env.SEARCH_RELAYS = 'wss://relay.nostr.band'
|
||
|
|
process.env.PORT = '3000'
|
||
|
|
process.env.CORS_ORIGIN = 'http://localhost:5173'
|
||
|
|
process.env.BASE_URL = 'http://localhost:3000'
|
||
|
|
process.env.DATA_DIR = dataDir
|