[tests] replace console.log so we can skip deprecation warnings during testing
This commit is contained in:
parent
e4bac7bb67
commit
88f2a7858f
|
@ -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);
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue