mirror of
https://github.com/Komediruzecki/token-circles.git
synced 2026-10-20 09:46:43 +02:00
* feat: Add Loans amortization table and verify migration features - Add LoanAmortizationTable component with basic and detailed views - Add "View Amortization" button to loan cards - Add amortization summary cards (Total Paid, Total Interest, Payoff Date, Interest Saved) - Add Prepayments section for loan cards - Add Rate Periods section for loan cards - Add Chart.js visualizations (principal vs interest, balance over time) - Add CSS styles for amortization table with color-coded rows - Update migration report with accurate status for all pages - Verify all Priority 2 (HIGH) items are completed - Verify Loans page now has full amortization functionality Closes remaining Priority 3 (MEDIUM) gap - Loans amortization table. * fix: complete vite-plugin-pwa setup and remaining lint issues - Move vite-plugin-pwa from root to frontend devDependencies - Remove problematic install scripts from root package.json - Fix all ESLint errors (unused imports, orphaned chart code) - Update npm scripts for cleaner workspace management - Update migration report with final status
37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
// Jest setup for finance-manager tests
|
|
// Suppress console output during tests unless there's a failure
|
|
/* eslint-disable no-undef */
|
|
if (process.env.NODE_ENV === 'test') {
|
|
global.console = {
|
|
...console,
|
|
log: jest.fn(),
|
|
debug: jest.fn(),
|
|
info: jest.fn(),
|
|
warn: jest.fn(),
|
|
error: jest.fn(),
|
|
};
|
|
}
|
|
|
|
// Set up test environment
|
|
process.env.NODE_ENV = 'test';
|
|
|
|
// Initialize shared rate limit stores to prevent cross-test pollution
|
|
if (typeof global.__rateLimitStore === 'undefined') {
|
|
global.__rateLimitStore = new Map();
|
|
}
|
|
if (typeof global.__authRateLimitStore === 'undefined') {
|
|
global.__authRateLimitStore = new Map();
|
|
}
|
|
|
|
// Clear rate limit stores before each test file
|
|
beforeEach(() => {
|
|
if (global.__rateLimitStore) global.__rateLimitStore.clear();
|
|
if (global.__authRateLimitStore) global.__authRateLimitStore.clear();
|
|
});
|
|
|
|
// Also clear after all tests
|
|
afterAll(() => {
|
|
if (global.__rateLimitStore) global.__rateLimitStore.clear();
|
|
if (global.__authRateLimitStore) global.__authRateLimitStore.clear();
|
|
});
|