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:
Janus C. H. Knudsen 2025-10-30 23:47:30 +01:00
parent fb48e410ea
commit 8bbb2f05d3
30 changed files with 365 additions and 559 deletions

View file

@ -1,11 +1,13 @@
import { describe, it, expect, beforeEach } from 'vitest';
import { DateService } from '../../src/utils/DateService';
import { CalendarConfig } from '../../src/core/CalendarConfig';
describe('DateService', () => {
let dateService: DateService;
beforeEach(() => {
dateService = new DateService('Europe/Copenhagen');
const config = new CalendarConfig();
dateService = new DateService(config);
});
describe('Core Conversions', () => {