No provider for AngularFire
<p>I'm using AngularFire2. I got this exception when running tests.</p>

<p>This is what my test looks like:</p>

<pre><code>import {inject, TestBed} from '@angular/core/testing';
import {FIREBASE_PROVIDERS, defaultFirebase, AngularFire} from 'angularfire2';

describe('stock data service', () =&gt; {
    beforeAll(() =&gt; {
        const config = {
            apiKey: "123",
            authDomain: "123.firebaseapp.com",
            databaseURL: "https://123.firebaseio.com",
            storageBucket: "123.appspot.com",
        }; 
        TestBed.configureTestingModule({
            providers: [FIREBASE_PROVIDERS, defaultFirebase(config)]   
        });
    });

    it('should connect to Firebase', inject([AngularFire], (af : AngularFire) =&gt; {
        expect(af.database).not.toBe(null);
    }));

});
</code></pre>

<p>I guess that AngularFire cannot be injected because it is a function?</p>