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
|
|
@ -3,6 +3,7 @@ import { NavigationManager } from '../../src/managers/NavigationManager';
|
|||
import { EventBus } from '../../src/core/EventBus';
|
||||
import { EventRenderingService } from '../../src/renderers/EventRendererManager';
|
||||
import { DateService } from '../../src/utils/DateService';
|
||||
import { CalendarConfig } from '../../src/core/CalendarConfig';
|
||||
|
||||
describe('NavigationManager - Edge Cases', () => {
|
||||
let navigationManager: NavigationManager;
|
||||
|
|
@ -11,9 +12,12 @@ describe('NavigationManager - Edge Cases', () => {
|
|||
|
||||
beforeEach(() => {
|
||||
eventBus = new EventBus();
|
||||
const config = new CalendarConfig();
|
||||
dateService = new DateService(config);
|
||||
const mockEventRenderer = {} as EventRenderingService;
|
||||
navigationManager = new NavigationManager(eventBus, mockEventRenderer);
|
||||
dateService = new DateService('Europe/Copenhagen');
|
||||
const mockGridRenderer = {} as any;
|
||||
const mockNavigationRenderer = {} as any;
|
||||
navigationManager = new NavigationManager(eventBus, mockEventRenderer, mockGridRenderer, dateService, mockNavigationRenderer);
|
||||
});
|
||||
|
||||
describe('Week 53 Navigation', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue