Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Inline isomorphic-fetch test helper (MetaMask#7945)
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh authored and yqrashawn committed Feb 3, 2020
1 parent 1e804e8 commit a31d645
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@
"gulp-zip": "^4.0.0",
"http-server": "^0.11.1",
"husky": ">=1",
"isomorphic-fetch": "^2.2.1",
"jsdom": "^11.2.0",
"jsdom-global": "^3.0.2",
"karma": "^4.1.0",
Expand Down
7 changes: 6 additions & 1 deletion test/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ global.log = log
//

// fetch
global.fetch = require('isomorphic-fetch')
const fetch = require('node-fetch')

global.fetch = fetch
global.Response = fetch.Response
global.Headers = fetch.Headers
global.Request = fetch.Request
require('abortcontroller-polyfill/dist/polyfill-patch-fetch')

// dom
Expand Down

0 comments on commit a31d645

Please sign in to comment.