backend unit tests
This commit is contained in:
13
backend/tests/setup.js
Normal file
13
backend/tests/setup.js
Normal file
@@ -0,0 +1,13 @@
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.JWT_SECRET = 'test-secret';
|
||||
process.env.DATABASE_URL = 'postgresql://test';
|
||||
process.env.GOOGLE_MAPS_API_KEY = 'test-key';
|
||||
process.env.STRIPE_SECRET_KEY = 'sk_test_key';
|
||||
|
||||
// Silence console
|
||||
global.console = {
|
||||
...console,
|
||||
log: jest.fn(),
|
||||
error: jest.fn(),
|
||||
warn: jest.fn()
|
||||
};
|
||||
Reference in New Issue
Block a user