Answer the question
In order to leave comments, you need to log in
Uncaught The email address is already in use by another account?
I'm trying to test a function that fetches data from firebase. I am using Chai + Mocha for testing purposes. But I get an error when I start testing: "Uncaught The email address is already in use by another account". In firebase console, authorization is allowed. The data that the function needs returns
The function I'm trying to test:
const getDbSnapshot = () => {
return firebase.database().ref().once('value');
};
describe('getDbSnapshot', () => {
it('Should be not empty and with appropreate fields', (done) => {
getDbSnapshot().then((res) => {
const snapshot = JSON.parse(JSON.stringify(res));
assert.exists(snapshot, 'Snapshot does not exist');
assert.exists(snapshot.clients, 'Clients does not exist');
assert.exists(snapshot.partners, 'Partners does not exist');
done();
});
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question