Files
tilbudgivern/backend/jest.setup.js
Alex ae3ad4918b feat: Implement SmartPackages component and enhance database schema for custom packages and advanced features
- Added SmartPackages component for selecting roof types and packages based on area and search criteria.
- Integrated API calls to fetch packages based on selected roof type and area.
- Implemented package selection logic and summary display for selected packages.
- Enhanced database schema with new tables for custom packages, advanced geometry calculations, and time calculations.
- Added foreign key relationships and indexes for improved performance.
- Created default packages for various roof types and implemented a view for easy package selection.
- Developed a function to calculate total project costs including selected packages and labor costs.
- Added triggers to keep project total updated on package and time calculation changes.
2025-09-24 14:37:15 +02:00

25 lines
545 B
JavaScript

// Jest setup file
global.console = {
...console,
// Suppress console.log during tests
log: jest.fn(),
debug: jest.fn(),
info: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
};
// Mock logger globally
jest.mock('./src/utils/logger', () => ({
info: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
debug: jest.fn()
}));
// Set test environment variables
process.env.NODE_ENV = 'test';
process.env.DB_HOST = 'localhost';
process.env.DB_USER = 'test_user';
process.env.DB_PASSWORD = 'test_pass';
process.env.DB_NAME = 'test_db';