Skip to content

Commit

Permalink
Update CustomModal test dependency registration
Browse files Browse the repository at this point in the history
Changed the dependency registration key for MockComponent to 'Obsidian.Component_' to ensure proper resolution within the DI container for testing CustomModal. This adjustment improves test reliability by aligning with updated component naming conventions.
  • Loading branch information
PxaMMaxP committed Jul 24, 2024
1 parent 48ef428 commit 12cf2a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/Modals/CustomModal/__tests__/CustomModal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ diContainer.register('ILogger_', MockLogger_);
diContainer.register('IApp', mockIApp);
diContainer.register('ILifecycleManager_', mockILifecycleManager);
diContainer.register('IDraggableElement_', mockIDraggableElement);
diContainer.register('Component_', MockComponent);
diContainer.register('Obsidian.Component_', MockComponent);

describe('CustomModal', () => {
let customModal: CustomModal;
Expand Down

0 comments on commit 12cf2a6

Please sign in to comment.