Skip to content

Instantly share code, notes, and snippets.

@Qarun-Qadir-Bissoondial
Last active September 30, 2020 23:41
Show Gist options
  • Save Qarun-Qadir-Bissoondial/a740ac9e7fe287fd7c10785d65414d2e to your computer and use it in GitHub Desktop.
Save Qarun-Qadir-Bissoondial/a740ac9e7fe287fd7c10785d65414d2e to your computer and use it in GitHub Desktop.
Testing To do service with HttpMock installed
fdescribe('TodoService', () => {
let service: TodoService;
let httpMock: HttpTestingController;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule]
});
service = TestBed.inject(TodoService);
httpMock = TestBed.inject(HttpTestingController);
});
afterEach(() => {
httpMock.verify();
})
it('should be created', () => {
expect(service).toBeTruthy();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment