Skip to content
Snippets Groups Projects
Select Git revision
  • 3d2c983cc4bee46c583b586c5ed69af64e46aaae
  • master default protected
  • 30-e2e-testing-with-cypress
  • 29-add-sass-styling-to-other-components
  • pipeline-test
  • 10-slette-annonse
6 results

app.component.spec.ts

Blame
  • app.component.spec.ts 886 B
    import { HttpClientTestingModule } from '@angular/common/http/testing';
    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,
            HttpClientTestingModule
          ],
          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 'client'`, () => {
        const fixture = TestBed.createComponent(AppComponent);
        const app = fixture.componentInstance;
        expect(app.title).toEqual('client');
      });
    });