jest-expo 48.0.1 → 49.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/src/preset/setup.js +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ A [Jest](https://facebook.github.io/jest/) preset to painlessly test your Expo /
|
|
|
4
4
|
|
|
5
5
|
### Installation
|
|
6
6
|
|
|
7
|
-
- To install the compatible version of `jest-expo` and `jest` for your project, run: `expo install jest-expo jest`.
|
|
7
|
+
- To install the compatible version of `jest-expo` and `jest` for your project, run: `npx expo install jest-expo jest`.
|
|
8
8
|
- Add the following config to `package.json`:
|
|
9
9
|
|
|
10
10
|
```json
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jest-expo",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "49.0.0-alpha.1",
|
|
4
4
|
"description": "A Jest preset to painlessly test your Expo / React Native apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"url": "https://github.com/expo/expo/issues"
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://github.com/expo/expo/tree/main/packages/jest-expo",
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "4ba50c428c8369bb6b3a51a860d4898ad4ccbe78"
|
|
50
50
|
}
|
package/src/preset/setup.js
CHANGED
|
@@ -11,8 +11,8 @@ const internalExpoModules = require('./internalExpoModules');
|
|
|
11
11
|
|
|
12
12
|
// window isn't defined as of react-native 0.45+ it seems
|
|
13
13
|
if (typeof window !== 'object') {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
globalThis.window = global;
|
|
15
|
+
globalThis.window.navigator = {};
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const mockImageLoader = {
|