mirror of
https://github.com/bitbaum/evig.git
synced 2026-12-04 12:19:20 +01:00
- Added curl to Dockerfile for health check improvements. - Modified npm install commands to build TypeScript and prune unnecessary packages. - Updated health check command to use curl for better reliability. - Adjusted TypeScript definitions for user-related functions to return more specific response types. - Changed user role options from 'viewer' to 'user' in multiple places for consistency. - Updated package.json dependencies, including downgrading jsonwebtoken types and switching bcrypt to bcryptjs for compatibility. - Added new environment variables for email configuration in the env.template file. - Cleaned up various files by removing unnecessary newlines and ensuring consistent formatting.
34 lines
631 B
TypeScript
34 lines
631 B
TypeScript
// Test setup file
|
|
import dotenv from 'dotenv';
|
|
|
|
// Load test environment variables
|
|
dotenv.config({ path: '.env.test' });
|
|
|
|
// Set test environment
|
|
process.env.NODE_ENV = 'test';
|
|
process.env.JWT_SECRET = 'test-jwt-secret-for-testing-only';
|
|
|
|
// Mock external dependencies if needed
|
|
jest.mock('../src/utils/database', () => ({
|
|
pool: {
|
|
connect: jest.fn(),
|
|
query: jest.fn(),
|
|
end: jest.fn(),
|
|
},
|
|
executeQuery: jest.fn(),
|
|
executeQuerySingle: jest.fn(),
|
|
executeTransaction: jest.fn(),
|
|
}));
|
|
|
|
// Global test setup
|
|
beforeAll(async () => {
|
|
// Setup test database or mocks
|
|
});
|
|
|
|
afterAll(async () => {
|
|
// Cleanup
|
|
});
|
|
|
|
|
|
|