diff options
author | Alex Shnitman <alexta69@gmail.com> | 2021-02-01 22:53:31 +0200 |
---|---|---|
committer | Alex Shnitman <alexta69@gmail.com> | 2021-02-02 21:09:28 +0200 |
commit | cb8f820d73525f637b648a0f8c33157f70bbd535 (patch) | |
tree | 3c16393594068609f5a3c7011eea992ead1f40ce /ui/src/app/app.component.spec.ts | |
parent | Merge pull request #17 from Rpsl/master (diff) | |
download | metube-cb8f820d73525f637b648a0f8c33157f70bbd535.tar.gz metube-cb8f820d73525f637b648a0f8c33157f70bbd535.tar.bz2 metube-cb8f820d73525f637b648a0f8c33157f70bbd535.zip |
upgrade dependencies (migrate to Angular 10)
Diffstat (limited to 'ui/src/app/app.component.spec.ts')
-rw-r--r-- | ui/src/app/app.component.spec.ts | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ui/src/app/app.component.spec.ts b/ui/src/app/app.component.spec.ts new file mode 100644 index 0000000..20b0ed6 --- /dev/null +++ b/ui/src/app/app.component.spec.ts @@ -0,0 +1,31 @@ +import { TestBed } from '@angular/core/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { + beforeEach(async () => { + await TestBed.configureTestingModule({ + 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 'metube'`, () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app.title).toEqual('metube'); + }); + + it('should render title', () => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.nativeElement; + expect(compiled.querySelector('.content span').textContent).toContain('metube app is running!'); + }); +}); |