-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathvitest.setup.ts
More file actions
20 lines (18 loc) · 878 Bytes
/
vitest.setup.ts
File metadata and controls
20 lines (18 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Add jest-dom matchers for React component testing
import '@testing-library/jest-dom/vitest';
const setIfMissing = (key: string, value: string) => {
if (!process.env[key]) {
process.env[key] = value;
}
};
setIfMissing('NODE_ENV', 'test');
setIfMissing('SESSION_SECRET', 'test-session-secret');
setIfMissing('DATABASE_URL', 'postgres://test:test@localhost:5432/test');
setIfMissing('REDIS_URL', 'redis://localhost:6379');
setIfMissing('GITHUB_CLIENT_ID', 'test-github-client-id');
setIfMissing('GITHUB_CLIENT_SECRET', 'test-github-client-secret');
setIfMissing('VAULT_MASTER_KEY', 'test-vault-master-key');
setIfMissing('NANGO_SECRET_KEY', 'test-nango-secret-key');
setIfMissing('STRIPE_SECRET_KEY', 'test-stripe-secret-key');
setIfMissing('STRIPE_PUBLISHABLE_KEY', 'test-stripe-publishable-key');
setIfMissing('STRIPE_WEBHOOK_SECRET', 'test-stripe-webhook-secret');