soumak77 / firebase-mock

Firebase mock library for writing unit tests
https://soumak77.github.io/firebase-mock
349 stars 97 forks source link

mockfirebase ref is not a function #151

Open RezaRahmati opened 5 years ago

RezaRahmati commented 5 years ago

Hi

I have below code in my test with jest

    import {MockFirebase} from 'firebase-mock';

    mockfirebase = new MockFirebase();
    mockfirebase.autoFlush();
    const ref = mockfirebase.ref('test');

but I get TypeError: mockfirebase.ref is not a function

Also when I console.log(typeof mockfirebase.ref); it will show object instead of function. What I am doing wrong?