aboutsummaryrefslogtreecommitdiffstats
path: root/test/helper.js
diff options
context:
space:
mode:
authorEsteban MIno <efmino@uc.cl>2018-08-21 06:35:38 +0800
committerEsteban MIno <efmino@uc.cl>2018-08-21 06:35:38 +0800
commit81cd29df43feb2469b78c6240d12ffcb9a68678e (patch)
tree15b14d9d3a29e5c21776ce5f9a3b35c7934abb81 /test/helper.js
parentdbab9a007fc9663427cebdbe1d41c51df67fd1fe (diff)
parent887cad973f25f43d2d4502ff31657f156a44b188 (diff)
downloadtangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.tar.gz
tangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.tar.zst
tangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.zip
Merge branch 'develop' into WatchTokenFeature
Diffstat (limited to 'test/helper.js')
-rw-r--r--test/helper.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/helper.js b/test/helper.js
index a3abbebf2..51f28de17 100644
--- a/test/helper.js
+++ b/test/helper.js
@@ -1,10 +1,21 @@
+const Ganache = require('ganache-core')
+const nock = require('nock')
import Enzyme from 'enzyme'
import Adapter from 'enzyme-adapter-react-15'
+nock.disableNetConnect()
+nock.enableNetConnect('localhost')
+
Enzyme.configure({ adapter: new Adapter() })
// disallow promises from swallowing errors
enableFailureOnUnhandledPromiseRejection()
+// ganache server
+const server = Ganache.server()
+server.listen(8545, () => {
+ console.log('Ganache Testrpc is running on "http://localhost:8545"')
+})
+
// logging util
var log = require('loglevel')
log.setDefaultLevel(5)
@@ -14,6 +25,9 @@ global.log = log
// polyfills
//
+// fetch
+global.fetch = require('isomorphic-fetch')
+
// dom
require('jsdom-global')()