The code is:

import { TestBed, async } from '@angular/core/testing';

import { DisplayComponent } from '../display.component';

import { RouterOutletStubComponent } from './router.outlet.stub'
import { RouterLinkStubDirective } from './router.link.stub'

describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
DisplayComponent, 
RouterLinkStubDirective,
RouterOutletStubComponent
],
}).compileComponents();
}));

it('should render 9999 in tag with Id "Id"', async(() => {
const fixture = TestBed.createComponent(DisplayComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('#Id').textContent).toContain('9999');
}));
});

Karma is giving me the error "Failed: No provider for Http!". Aftyer two 
days searching, i haven't found the answer; please help.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to