Angular 4 unit testing with jasmine /karma with http post mocking - how to fix
问题 I have a service I want to unit test in angular 4 typescript jasmine. Now, the http is doing a post , and it returns an identity, however.. it is not sending anything. I want to just have good code coverage but i don't understand how to quite complete this mocking statement. here is the method for http post in my service file addSession() { let headers = new Headers({ 'Content-Type': 'application/json' }); let options = new RequestOptions({ headers: headers }); return this.http.post(this.url,