From 2c78528410a67aa1a9e1a2e256b1d911f1845d89 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Tue, 9 Jan 2024 19:51:53 +0200 Subject: [PATCH] fix unit test --- .../error/error-alert.component.spec.ts | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/ui/src/app/shared/error/error-alert.component.spec.ts b/ui/src/app/shared/error/error-alert.component.spec.ts index 73234dc4f..42c71e68d 100644 --- a/ui/src/app/shared/error/error-alert.component.spec.ts +++ b/ui/src/app/shared/error/error-alert.component.spec.ts @@ -1,21 +1,24 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing' -import { ErrorAlertComponent } from './error-alert.component'; +import { ErrorAlertComponent } from './error-alert.component' +import { ErrorService } from '../service/error.service' +import { AppModule } from 'src/app/app.module' describe('ErrorAlertComponent', () => { - let component: ErrorAlertComponent; - let fixture: ComponentFixture; + let component: ErrorAlertComponent + let fixture: ComponentFixture beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ErrorAlertComponent] - }); - fixture = TestBed.createComponent(ErrorAlertComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); + imports: [AppModule], + declarations: [ErrorAlertComponent], + }) + fixture = TestBed.createComponent(ErrorAlertComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) it('should create', () => { - expect(component).toBeTruthy(); - }); -}); + expect(component).toBeTruthy() + }) +})