diff options
author | TAMARA JERINIC <tamara.jerinic@gmail.com> | 2022-03-02 23:30:12 +0100 |
---|---|---|
committer | TAMARA JERINIC <tamara.jerinic@gmail.com> | 2022-03-02 23:30:12 +0100 |
commit | 9826a8079ffcd1d849a8a8821696d51691606133 (patch) | |
tree | 83e2ed73780c04342376eb30a63cc1a11512ba78 /sandbox/TestTamara/FRONT/Ski/src/app/app.component.spec.ts | |
parent | 4b9d20c68a80fa97b61559a6dd99ac6c9a04623c (diff) |
Dodata test aplikacija
Diffstat (limited to 'sandbox/TestTamara/FRONT/Ski/src/app/app.component.spec.ts')
-rw-r--r-- | sandbox/TestTamara/FRONT/Ski/src/app/app.component.spec.ts | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sandbox/TestTamara/FRONT/Ski/src/app/app.component.spec.ts b/sandbox/TestTamara/FRONT/Ski/src/app/app.component.spec.ts new file mode 100644 index 00000000..ba428134 --- /dev/null +++ b/sandbox/TestTamara/FRONT/Ski/src/app/app.component.spec.ts @@ -0,0 +1,35 @@ +import { TestBed } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + declarations: [ + AppComponent + ], + }).compileComponents(); + }); + + it('should create the app', () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app).toBeTruthy(); + }); + + it(`should have as title 'Ski'`, () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app.title).toEqual('Ski'); + }); + + it('should render title', () => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.nativeElement as HTMLElement; + expect(compiled.querySelector('.content span')?.textContent).toContain('Ski app is running!'); + }); +}); |