Migrate tests away from "jsdom" environment
Reviewed By: leebyron Differential Revision: D5748304 fbshipit-source-id: c66df45f1f35333f994c41eb8ff4cfccc1bb04d4
This commit is contained in:
parent
7b770556ac
commit
bae5505902
|
@ -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};
|
||||
}
|
||||
|
|
|
@ -80,7 +80,8 @@
|
|||
"denodeify",
|
||||
"fbjs",
|
||||
"sinon"
|
||||
]
|
||||
],
|
||||
"testEnvironment": "node"
|
||||
},
|
||||
"main": "Libraries/react-native/react-native-implementation.js",
|
||||
"files": [
|
||||
|
|
Loading…
Reference in New Issue