aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-05-25 13:10:17 +0800
committerkumavis <aaron@kumavis.me>2018-05-25 13:10:17 +0800
commit630e2300f4c2377bf14931964cfe9542910292db (patch)
treefc5c108132fe9d4077d959fb21032e3a91e158ed
parent380964a68728b557a892d4b2e7175f45afe8222a (diff)
downloadtangerine-wallet-browser-630e2300f4c2377bf14931964cfe9542910292db.tar
tangerine-wallet-browser-630e2300f4c2377bf14931964cfe9542910292db.tar.gz
tangerine-wallet-browser-630e2300f4c2377bf14931964cfe9542910292db.tar.bz2
tangerine-wallet-browser-630e2300f4c2377bf14931964cfe9542910292db.tar.lz
tangerine-wallet-browser-630e2300f4c2377bf14931964cfe9542910292db.tar.xz
tangerine-wallet-browser-630e2300f4c2377bf14931964cfe9542910292db.tar.zst
tangerine-wallet-browser-630e2300f4c2377bf14931964cfe9542910292db.zip
test - unit - move fetch polyfill to helper
-rw-r--r--test/helper.js3
-rw-r--r--test/unit/app/controllers/currency-controller-test.js3
-rw-r--r--test/unit/config-manager-test.js3
3 files changed, 3 insertions, 6 deletions
diff --git a/test/helper.js b/test/helper.js
index a3abbebf2..6f1bc051f 100644
--- a/test/helper.js
+++ b/test/helper.js
@@ -14,6 +14,9 @@ global.log = log
// polyfills
//
+// fetch
+global.fetch = require('isomorphic-fetch')
+
// dom
require('jsdom-global')()
diff --git a/test/unit/app/controllers/currency-controller-test.js b/test/unit/app/controllers/currency-controller-test.js
index 1941d1c43..7c4644d9f 100644
--- a/test/unit/app/controllers/currency-controller-test.js
+++ b/test/unit/app/controllers/currency-controller-test.js
@@ -1,6 +1,3 @@
-// polyfill fetch
-global.fetch = global.fetch || require('isomorphic-fetch')
-
const assert = require('assert')
const nock = require('nock')
const CurrencyController = require('../../../../app/scripts/controllers/currency')
diff --git a/test/unit/config-manager-test.js b/test/unit/config-manager-test.js
index b710e2dfb..df0c549d0 100644
--- a/test/unit/config-manager-test.js
+++ b/test/unit/config-manager-test.js
@@ -1,6 +1,3 @@
-// polyfill fetch
-global.fetch = global.fetch || require('isomorphic-fetch')
-
const assert = require('assert')
const configManagerGen = require('../lib/mock-config-manager')