Angular LMS app
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
Den här utvecklingskatalogen är arkiverad. Du kan se filer och klona katalogen, men inte öppna ärenden eller genomföra push- eller pull-förfrågningar.

app.component.spec.ts 1.0 KiB

5 år sedan
1234567891011121314151617181920212223242526272829303132333435
  1. import { TestBed, async } from '@angular/core/testing';
  2. import { RouterTestingModule } from '@angular/router/testing';
  3. import { AppComponent } from './app.component';
  4. describe('AppComponent', () => {
  5. beforeEach(async(() => {
  6. TestBed.configureTestingModule({
  7. imports: [
  8. RouterTestingModule
  9. ],
  10. declarations: [
  11. AppComponent
  12. ],
  13. }).compileComponents();
  14. }));
  15. it('should create the app', () => {
  16. const fixture = TestBed.createComponent(AppComponent);
  17. const app = fixture.componentInstance;
  18. expect(app).toBeTruthy();
  19. });
  20. it(`should have as title 'lms-app-new'`, () => {
  21. const fixture = TestBed.createComponent(AppComponent);
  22. const app = fixture.componentInstance;
  23. expect(app.title).toEqual('lms-app-new');
  24. });
  25. it('should render title', () => {
  26. const fixture = TestBed.createComponent(AppComponent);
  27. fixture.detectChanges();
  28. const compiled = fixture.nativeElement;
  29. expect(compiled.querySelector('.content span').textContent).toContain('lms-app-new app is running!');
  30. });
  31. });