updating unit and integration tests
This commit is contained in:
13
backend/tests/integration-setup.js
Normal file
13
backend/tests/integration-setup.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// Integration test setup
|
||||
// Integration tests use a real database, so we don't mock DATABASE_URL
|
||||
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
// Ensure JWT secrets are set for integration tests
|
||||
process.env.JWT_ACCESS_SECRET = process.env.JWT_ACCESS_SECRET || 'test-access-secret';
|
||||
process.env.JWT_REFRESH_SECRET = process.env.JWT_REFRESH_SECRET || 'test-refresh-secret';
|
||||
process.env.JWT_SECRET = process.env.JWT_SECRET || 'test-secret';
|
||||
|
||||
// Set other required env vars if not already set
|
||||
process.env.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY || 'test-key';
|
||||
process.env.STRIPE_SECRET_KEY = process.env.STRIPE_SECRET_KEY || 'sk_test_key';
|
||||
Reference in New Issue
Block a user