[tests] replace console.log so we can skip deprecation warnings during testing

This commit is contained in:
Salakar 2018-04-09 20:11:49 +01:00
parent e4bac7bb67
commit 88f2a7858f
1 changed files with 14 additions and 0 deletions

View File

@ -30,3 +30,17 @@ firebaseAdmin.initializeApp({
credential: firebaseAdmin.credential.cert(require('./service-account')), credential: firebaseAdmin.credential.cert(require('./service-account')),
databaseURL: 'https://rnfirebase-b9ad4.firebaseio.com', databaseURL: 'https://rnfirebase-b9ad4.firebaseio.com',
}); });
const originalLog = console.log;
console.log = (...args) => {
if (
args &&
args[0] &&
typeof args[0] === 'string' &&
args[0].includes('Deprecated ')
) {
return undefined;
}
return originalLog(...args);
};