File: examples/Angular/src/app/app.component.spec.ts

Recommend this page to a friend!
  Classes of Arturs Sosins   Countly Web SDK   examples/Angular/src/app/app.component.spec.ts   Download  
File: examples/Angular/src/app/app.component.spec.ts
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Countly Web SDK
Track site accesses and errors the Countly API
Author: By
Last change:
Date: 1 month ago
Size: 959 bytes
 

Contents

Class file image Download
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 'Angular'`, () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; expect(app.title).toEqual('Angular'); }); it('should render title', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.nativeElement as HTMLElement; expect(compiled.querySelector('.content span')?.textContent).toContain('Angular app is running!'); }); });