mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-22 11:16:18 +08:00
[tests] replace console.log so we can skip deprecation warnings during testing
This commit is contained in:
@@ -30,3 +30,17 @@ firebaseAdmin.initializeApp({
|
||||
credential: firebaseAdmin.credential.cert(require('./service-account')),
|
||||
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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user