From 23f0af976cdd3f1723c378a8e8e7b4ea067122e2 Mon Sep 17 00:00:00 2001 From: apanizo Date: Fri, 1 Jun 2018 08:49:52 +0200 Subject: [PATCH] WA-238 Silence tests' output --- src/routes/open/components/Layout.test.js | 6 +++--- src/wallets/getWeb3.js | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/routes/open/components/Layout.test.js b/src/routes/open/components/Layout.test.js index 5d67a410..130bba70 100644 --- a/src/routes/open/components/Layout.test.js +++ b/src/routes/open/components/Layout.test.js @@ -65,10 +65,10 @@ describe('React DOM TESTS > Create Safe form', () => { const deployed = TestUtils.findRenderedDOMComponentWithClass(open, DEPLOYED_COMPONENT_ID) if (deployed) { - const transactionHash = JSON.parse(deployed.getElementsByTagName('pre')[0].innerHTML) - delete transactionHash.logsBloom + const transaction = JSON.parse(deployed.getElementsByTagName('pre')[0].innerHTML) + delete transaction.receipt.logsBloom // eslint-disable-next-line - console.log(transactionHash) + // console.log(transaction) } }) }) diff --git a/src/wallets/getWeb3.js b/src/wallets/getWeb3.js index aa57987b..5e9602c5 100644 --- a/src/wallets/getWeb3.js +++ b/src/wallets/getWeb3.js @@ -28,8 +28,11 @@ export const getProviderInfo: Function = async (): Promise => { // Use MetaMask's provider. web3 = new Web3(window.web3.currentProvider) - // eslint-disable-next-line - console.log('Injected web3 detected.') + + if (process.env.NODE_ENV !== 'test') { + // eslint-disable-next-line + console.log('Injected web3 detected.') + } const name = isMetamask(web3) ? 'METAMASK' : 'UNKNOWN' const account = await getAccountFrom(web3)