aboutsummaryrefslogtreecommitdiffstats
path: root/test/helper.js
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-08-18 00:56:07 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-08-18 00:56:07 +0800
commit992e7f1b5aae5ae4a96c67dd40b6626f181b51c1 (patch)
tree11a429e8d3fdbe7b4945d77273598091c4cbd70d /test/helper.js
parent51e4a6d3355524cd8622d6d2893cc878a64dc53e (diff)
downloadtangerine-wallet-browser-992e7f1b5aae5ae4a96c67dd40b6626f181b51c1.tar.gz
tangerine-wallet-browser-992e7f1b5aae5ae4a96c67dd40b6626f181b51c1.tar.zst
tangerine-wallet-browser-992e7f1b5aae5ae4a96c67dd40b6626f181b51c1.zip
fix merge conflicts
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')()