angular 2 rc7 - testing service - Error: No provider for String
<p>I've getting an error in angular 2 testing using the webpack quickstart project.</p>

<blockquote>
  <p>Error: No provider for String! in config/karma-test-shim.js</p>
</blockquote>

<p>I've never seen this error where the provider for String is missing. I figured out its related the private url:string in the services constructor but how do I resolve it?</p>

<p>Here's my testfile</p>

<pre><code>describe('http.ts',()=&gt;{
    beforeEach(()=&gt;{
        TestBed.configureTestingModule({
            providers:[
                SbHttp,
                MockBackend,
                BaseRequestOptions,
                { provide: Http, useFactory: (backend: MockBackend, defaultOptions: BaseRequestOptions) =&gt; {
                    return new Http(backend, defaultOptions);
                }, deps: [MockBackend, BaseRequestOptions]}
            ],
            imports: [
                HttpModule
            ]
        })
    });

    afterEach(()=&gt;{
        TestBed.resetTestingModule()

    });

    it('get() should work', inject([SbHttp],(sbHttp:SbHttp)=&gt;{
        expect(true).toBeTruthy()

    }))
})
</code></pre>

<p>and here's the SbHttp service</p>

<pre><code>@Injectable()
export class SbHttp{

    private baseUrl:string;

    constructor( private url:string, private headers:Headers, private http:Http
    ){
        this.baseUrl = utils.stripTrailingSlash(url)
    }
}
</code></pre>

<p>If I change to private url:any I'm getting this error</p>

<blockquote>
  <p>Can't resolve all parameters for SbHttp: (?, Headers, Http).</p>
</blockquote>