I am trying to write some tests for my database client, which requires me to authenticate with Firebase first.
I use Jest as my test runner.
My test is as follows:
it ('should sign in ', async (done) => {
try {
await auth.signInWithEmailAndPassword('testabc@test.com', 'testuser');
} catch (e) {
console.log(e);
}
done();
});
My firebase application was initialized and I confirmed the correctness of the API key.
A few interesting notes: even if I get:
'A network error (such as timeout, interrupted connection or unreachable host) has occurred.'
On the firebase console, I see that my test user has logged in. Mirroring: Firebase throws "auth / network-request-failed" to signInAnonymously () while running jest tests
( / ), , .
.
?