jest-expo 51.0.2 → 51.0.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jest-expo",
|
|
3
|
-
"version": "51.0.
|
|
3
|
+
"version": "51.0.4",
|
|
4
4
|
"description": "A Jest preset to painlessly test your Expo / React Native apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"preset": "jest-expo/universal"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@expo/config": "~9.0.0",
|
|
34
|
+
"@expo/config": "~9.0.0-beta.0",
|
|
35
35
|
"@expo/json-file": "^8.3.0",
|
|
36
36
|
"@jest/create-cache-key-function": "^29.2.1",
|
|
37
37
|
"babel-jest": "^29.2.1",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"url": "https://github.com/expo/expo/issues"
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://github.com/expo/expo/tree/main/packages/jest-expo",
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "3366305d10c4daa579ef445f870d8bc5c0cd11df"
|
|
52
52
|
}
|
package/src/preset/setup.js
CHANGED
|
@@ -185,9 +185,8 @@ jest.doMock('react-native/Libraries/LogBox/LogBox', () => ({
|
|
|
185
185
|
// Mock the `createSnapshotFriendlyRef` to return an ref that can be serialized in snapshots.
|
|
186
186
|
jest.doMock('expo-modules-core/build/Refs', () => ({
|
|
187
187
|
createSnapshotFriendlyRef: () => {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
const ref = Object.create(createSnapshotFriendlyRef());
|
|
188
|
+
// We cannot use `createRef` since it is not extensible.
|
|
189
|
+
const ref = { current: null };
|
|
191
190
|
Object.defineProperty(ref, 'toJSON', {
|
|
192
191
|
value: () => '[React.ref]',
|
|
193
192
|
});
|
|
@@ -12,6 +12,9 @@ function jestMappingFromTypescriptPaths(paths, prefix = '<rootDir>') {
|
|
|
12
12
|
const mapping = {};
|
|
13
13
|
|
|
14
14
|
for (const path in paths) {
|
|
15
|
+
// Abort when path is just a wildcard
|
|
16
|
+
if (path === '*') continue;
|
|
17
|
+
|
|
15
18
|
if (!paths[path].length) {
|
|
16
19
|
console.warn(`Skipping empty typescript path map: ${path}`);
|
|
17
20
|
continue;
|