Permalink
Browse files

Migrate tests away from "jsdom" environment

Reviewed By: leebyron

Differential Revision: D5748304

fbshipit-source-id: c66df45f1f35333f994c41eb8ff4cfccc1bb04d4
  • Loading branch information...
mjesun authored and facebook-github-bot committed Sep 11, 2017
1 parent 7b77055 commit bae55059023a1e16993ab5a33e99512fbce4ceb7
Showing with 9 additions and 3 deletions.
  1. +1 −0 Libraries/Animated/src/__tests__/AnimatedNative-test.js
  2. +6 −2 Libraries/Network/fetch.js
  3. +2 −1 package.json
@@ -9,6 +9,7 @@
'use strict';
jest
.clearAllMocks()
.setMock('Text', {})
.setMock('View', {})
.setMock('Image', {})
@@ -14,6 +14,10 @@
'use strict';
import 'whatwg-fetch';
import whatwg from 'whatwg-fetch';
module.exports = {fetch, Headers, Request, Response};
if (whatwg && whatwg.fetch) {
module.exports = whatwg;
} else {
module.exports = {fetch, Headers, Request, Response};
}
View
@@ -80,7 +80,8 @@
"denodeify",
"fbjs",
"sinon"
]
],
"testEnvironment": "node"
},
"main": "Libraries/react-native/react-native-implementation.js",
"files": [

0 comments on commit bae5505

Please sign in to comment.