Refactors dependency injection and configuration management
Replaces global singleton configuration with dependency injection Introduces more modular and testable approach to configuration Removes direct references to calendarConfig in multiple components Adds explicit configuration passing to constructors Improves code maintainability and reduces global state dependencies
This commit is contained in:
parent
fb48e410ea
commit
8bbb2f05d3
30 changed files with 365 additions and 559 deletions
|
|
@ -1,8 +1,10 @@
|
|||
import { describe, it, expect } from 'vitest';
|
||||
import { DateService } from '../../src/utils/DateService';
|
||||
import { CalendarConfig } from '../../src/core/CalendarConfig';
|
||||
|
||||
describe('DateService - Edge Cases', () => {
|
||||
const dateService = new DateService('Europe/Copenhagen');
|
||||
const config = new CalendarConfig();
|
||||
const dateService = new DateService(config);
|
||||
|
||||
describe('Leap Year Handling', () => {
|
||||
it('should handle February 29 in leap year (2024)', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue