title: Angular4 Testing Karma - Error: Can't resolve all parameters for RequestOptions: (?)
body: <p>This is my spec.ts file. I'm stuck with the error:</p>
  
  <blockquote>
    <p>Error: Can't resolve all parameters for RequestOptions: (?)</p>
  </blockquote>
  
  <p>I have imported all the providers necessary also. Can anyone please help me resolve this error? </p>
  
  <pre><code>import { async, ComponentFixture, TestBed, inject } from '@angular/core/testing';
  import { ResetPasswordComponent } from './reset-password.component';
  import { ConfigService } from './../config-service.service';
  import {Http, Headers, ConnectionBackend, RequestOptions} from '@angular/http';
  
  describe('ResetPasswordComponent', () =&gt; {
    // let component: ResetPasswordComponent;
    // let fixture: ComponentFixture&lt;ResetPasswordComponent&gt;;
  
     beforeEach(() =&gt; {
      TestBed.configureTestingModule({
        providers: [ResetPasswordComponent, ConfigService, Http, ConnectionBackend, RequestOptions]
      });
    });
  
    // beforeEach(async(() =&gt; {
    //   TestBed.configureTestingModule({
    //     declarations: [ ResetPasswordComponent ]
    //   })
    //   .compileComponents();
    // }));
  
    beforeEach(() =&gt; {
      fixture = TestBed.createComponent(ResetPasswordComponent);
      component = fixture.componentInstance;
      fixture.detectChanges();
    });
  
    // it('should create', () =&gt; {
    //   expect(component).toBeTruthy();
    // });
  
    it('should create', () =&gt; {
      expect('holaa').toBe('holaa');
    });
  
    it('Is Password Change Function Working', inject([ResetPasswordComponent], (reset:ResetPasswordComponent) =&gt; {
      expect(reset.simplyAFunction()).toBe(true);
    }));
  });
  </code></pre>