From 88f2a7858f43121ece3fc6e9cff0c747bd778673 Mon Sep 17 00:00:00 2001 From: Salakar Date: Mon, 9 Apr 2018 20:11:49 +0100 Subject: [PATCH] [tests] replace console.log so we can skip deprecation warnings during testing --- bridge/helpers/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bridge/helpers/index.js b/bridge/helpers/index.js index b611d53c..17a4a731 100644 --- a/bridge/helpers/index.js +++ b/bridge/helpers/index.js @@ -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); +};