~hokiegeek/biologist-web

ref: b6f62f29b8cef976d01932042d5eb079098ec37a biologist-web/src/app/app.component.spec.ts -rw-r--r-- 1.7 KiB
b6f62f29HokieGeek GUI simplication 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { TestBed, async } from '@angular/core/testing';
import { HttpClientModule } from '@angular/common/http';
import { FormsModule } from '@angular/forms';

import { AppComponent } from './app.component';
import { ControlsComponent } from './controls/controls.component';
import { PetridishComponent } from './petridish/petridish.component';
import { BoardComponent } from './petridish/board/board.component';
import { CultureInfoComponent } from './petridish/culture-info/culture-info.component';
import { DishrackComponent } from './dishrack/dishrack.component';

import { Lab } from './lab.service';

describe('AppComponent', () => {
  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [
        AppComponent,
        ControlsComponent,
        PetridishComponent,
        BoardComponent,
        CultureInfoComponent,
        DishrackComponent
      ],
      imports: [
        FormsModule,
        HttpClientModule,
      ],
      providers: [Lab],
    }).compileComponents();
  }));

  it('should create the app', async(() => {
    const fixture = TestBed.createComponent(AppComponent);
    const app = fixture.debugElement.componentInstance;
    expect(app).toBeTruthy();
  }));

    /*
  it(`should have as title 'app'`, async(() => {
    const fixture = TestBed.createComponent(AppComponent);
    const app = fixture.debugElement.componentInstance;
    expect(app.title).toEqual('app');
  }));

  it('should render title in a h1 tag', async(() => {
    const fixture = TestBed.createComponent(AppComponent);
    fixture.detectChanges();
    const compiled = fixture.debugElement.nativeElement;
    expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
  }));
     */
});