Last active
September 30, 2020 23:41
-
-
Save Qarun-Qadir-Bissoondial/a740ac9e7fe287fd7c10785d65414d2e to your computer and use it in GitHub Desktop.
Testing To do service with HttpMock installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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