Skip to content

Instantly share code, notes, and snippets.

@cironunes
Last active October 27, 2017 15:11
Show Gist options
  • Save cironunes/83940e678ae37ce14fc5498a013bad41 to your computer and use it in GitHub Desktop.
Save cironunes/83940e678ae37ce14fc5498a013bad41 to your computer and use it in GitHub Desktop.
import { TestBed, getTestBed } from '@angular/core/testing';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { GithubApiService } from './github-api.service';
describe('GithubApiService', () => {
let injector: TestBed;
let service: GithubApiService;
let httpMock: HttpTestingController;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
providers: [GithubApiService]
});
injector = getTestBed();
service = injector.get(GithubApiService);
httpMock = injector.get(HttpTestingController);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment