title: Expected undefined to equal 2
body: <p><strong>Technologies Used:</strong> Karma/Jasmine, Angular2</p>
  
  <p><strong>service.ts</strong></p>
  
  <pre><code>Injectable()
  export class Service { 
  
      constructor(private http: Http) { }
        getGoogle(): Observable&lt;any&gt;{
          console.log("Inside service");
          return this.http.get('https://jsonplaceholder.typicode.com/posts/1');    
       }}
  </code></pre>
  
  <p><strong>Please ignore the Typos and all the imports are made correctly.API is getting called correctly in the UI.</strong></p>
  
  <p><strong>service.spec.ts</strong></p>
  
  <pre><code>describe('Provider:Service', () =&gt; {
  
  const HERO_ONE = 'HeroNrOne';
  const HERO_TWO = 'WillBeAlwaysTheSecond';
  
      let lastConnection;
      let service;
  
  
      beforeEach(() =&gt; {
          let injector = ReflectiveInjector.resolveAndCreate([
              { provide: ConnectionBackend, useClass: MockBackend },
              { provide: RequestOptions, useClass: BaseRequestOptions },
              Http,
              Service
  
          ]);
          service = injector.get(Service);
          let backend = injector.get(ConnectionBackend) as MockBackend;
          backend.connections.subscribe((connection: any) =&gt; lastConnection = connection);
  
      }); 
  
    it('getGoogle() should return the data in json format', fakeAsync(() =&gt; {
          console.log('1');
          let result:String[];
          service.getGoogle().toPromise().then((heroes:String[]) =&gt; result = heroes);
          lastConnection.mockRespond(new Response(new ResponseOptions({
              body:JSON.stringify({data: [HERO_ONE, HERO_TWO]}),
            })));
          tick();
          console.log(result[0]);
          console.log('3');
  
          expect(result.length).toEqual(2, 'should contain given amount of 
          heroes');   //this spec is failing because results does is not getting the response.  
  
      }));
  </code></pre>
  
  <p>The <code>result:String[]</code> is not getting the response that is provided.</p>