diff --git a/lib/core/src/lib/notifications/services/notification.service.spec.ts b/lib/core/src/lib/notifications/services/notification.service.spec.ts index 93f4fb3c0e..c04ea2df8d 100644 --- a/lib/core/src/lib/notifications/services/notification.service.spec.ts +++ b/lib/core/src/lib/notifications/services/notification.service.spec.ts @@ -228,7 +228,7 @@ describe('NotificationService', () => { fixture.detectChanges(); expect(document.querySelector('.custom-template-class')).not.toBeNull(); - expect(document.querySelector('.custom-template-class').innerHTML).toEqual('Custom content with templateRef'); + expect(document.querySelector('.custom-template-class')?.innerHTML).toEqual('Custom content with templateRef'); }); it('should open a message notification bar with action and custom templateRef configuration', (done) => { @@ -240,7 +240,7 @@ describe('NotificationService', () => { fixture.detectChanges(); expect(document.querySelector('.custom-template-class')).not.toBeNull(); - expect(document.querySelector('.custom-template-class').innerHTML).toEqual('Custom content with templateRef'); + expect(document.querySelector('.custom-template-class')?.innerHTML).toEqual('Custom content with templateRef'); }); });