From bd382f4705ffdc10d193d02dfaa9d1b5ff2f1488 Mon Sep 17 00:00:00 2001 From: kumavis Date: Tue, 10 Jan 2017 12:39:01 -0800 Subject: [PATCH] tests - add fetch polyfill --- package.json | 1 + test/unit/config-manager-test.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 23070cceb..3a02c64df 100644 --- a/package.json +++ b/package.json @@ -117,6 +117,7 @@ "gulp-util": "^3.0.7", "gulp-watch": "^4.3.5", "gulp-zip": "^3.2.0", + "isomorphic-fetch": "^2.2.1", "jsdom": "^8.1.0", "jsdom-global": "^1.7.0", "jshint-stylish": "~0.1.5", diff --git a/test/unit/config-manager-test.js b/test/unit/config-manager-test.js index 075abbe65..77d431d5f 100644 --- a/test/unit/config-manager-test.js +++ b/test/unit/config-manager-test.js @@ -1,8 +1,10 @@ +// polyfill fetch +global.fetch = global.fetch || require('isomorphic-fetch') const assert = require('assert') const extend = require('xtend') const rp = require('request-promise') const nock = require('nock') -var configManagerGen = require('../lib/mock-config-manager') +const configManagerGen = require('../lib/mock-config-manager') const STORAGE_KEY = 'metamask-persistance-key' describe('config-manager', function() {