Skip to content

Instantly share code, notes, and snippets.

@AkshayRana92
Created September 14, 2017 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AkshayRana92/911996ea98ec18bf2ac224802727b523 to your computer and use it in GitHub Desktop.
Save AkshayRana92/911996ea98ec18bf2ac224802727b523 to your computer and use it in GitHub Desktop.
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
AppService,
MockBackend,
BaseRequestOptions,
{
provide: Http,
useFactory: (backend: MockBackend, defaultOptions: BaseRequestOptions) => {
return new Http(backend, defaultOptions);
},
deps: [MockBackend, BaseRequestOptions],
}
]
});
service = TestBed.get(AppService)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment