Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {TestBed, async, ComponentFixture, fakeAsync, flush} from '@angular/core/testing';
- import {AppComponent} from './app.component';
- describe('AppComponent', () => {
- let fixture: ComponentFixture<AppComponent>;
- let component: AppComponent;
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [
- AppComponent
- ],
- }).compileComponents();
- fixture = TestBed.createComponent(AppComponent);
- component = fixture.componentInstance;
- }));
- it('test case', fakeAsync(() => {
- console.log('called function');
- component.functionUnderTest();
- console.log('calling flush');
- flush();
- console.log('after flush');
- }));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement