jest-expo 52.0.0-canary-20241021-c4b5a93 → 52.0.0-preview.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/jest-preset.js +48 -8
- package/package.json +5 -5
package/jest-preset.js
CHANGED
|
@@ -27,15 +27,55 @@ jestPreset.transform['\\.[jt]sx?$'] = [
|
|
|
27
27
|
{ caller: { name: 'metro', bundler: 'metro', platform: 'ios' } },
|
|
28
28
|
];
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
/* Update this when metro changes their default extensions */
|
|
31
|
+
const defaultMetroAssetExts = [
|
|
32
|
+
// Image formats
|
|
33
|
+
'bmp',
|
|
34
|
+
'gif',
|
|
35
|
+
'jpg',
|
|
36
|
+
'jpeg',
|
|
37
|
+
'png',
|
|
38
|
+
'psd',
|
|
39
|
+
'svg',
|
|
40
|
+
'webp',
|
|
41
|
+
'xml',
|
|
42
|
+
// Video formats
|
|
43
|
+
'm4v',
|
|
44
|
+
'mov',
|
|
45
|
+
'mp4',
|
|
46
|
+
'mpeg',
|
|
47
|
+
'mpg',
|
|
48
|
+
'webm',
|
|
49
|
+
// Audio formats
|
|
50
|
+
'aac',
|
|
51
|
+
'aiff',
|
|
52
|
+
'caf',
|
|
53
|
+
'm4a',
|
|
54
|
+
'mp3',
|
|
55
|
+
'wav',
|
|
56
|
+
// Document formats
|
|
57
|
+
'html',
|
|
58
|
+
'pdf',
|
|
59
|
+
'yaml',
|
|
60
|
+
'yml',
|
|
61
|
+
// Font formats
|
|
62
|
+
'otf',
|
|
63
|
+
'ttf',
|
|
64
|
+
// Archives (virtual files)
|
|
65
|
+
'zip',
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
/** Update this when we change @expo/metro-config */
|
|
69
|
+
const defaultExpoMetroAssetExts = [
|
|
70
|
+
...defaultMetroAssetExts,
|
|
71
|
+
// Add default support for `expo-image` file types.
|
|
72
|
+
'heic',
|
|
73
|
+
'avif',
|
|
74
|
+
// Add default support for `expo-sqlite` file types.
|
|
75
|
+
'db',
|
|
76
|
+
];
|
|
36
77
|
|
|
37
|
-
const assetNamePattern =
|
|
38
|
-
'^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp|ttf|otf|m4v|mov|mp4|mpeg|mpg|webm|aac|aiff|caf|m4a|mp3|wav|html|pdf|obj)$';
|
|
78
|
+
const assetNamePattern = `^.+\\.(${defaultExpoMetroAssetExts.join('|')})$`;
|
|
39
79
|
jestPreset.transform[assetNamePattern] = require.resolve(
|
|
40
80
|
'jest-expo/src/preset/assetFileTransformer.js'
|
|
41
81
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jest-expo",
|
|
3
|
-
"version": "52.0.0-
|
|
3
|
+
"version": "52.0.0-preview.1",
|
|
4
4
|
"description": "A Jest preset to painlessly test your Expo / React Native apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"preset": "jest-expo/universal"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@expo/config": "10.0.0
|
|
41
|
-
"@expo/json-file": "
|
|
40
|
+
"@expo/config": "~10.0.0",
|
|
41
|
+
"@expo/json-file": "^9.0.0",
|
|
42
42
|
"@jest/create-cache-key-function": "^29.2.1",
|
|
43
43
|
"@jest/globals": "^29.2.1",
|
|
44
44
|
"babel-jest": "^29.2.1",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"stacktrace-js": "^2.0.2"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"expo": "
|
|
59
|
+
"expo": "*",
|
|
60
60
|
"react-native": "*"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "2e4f18d41da033c5ced0a4a045d91cf5250016b7"
|
|
63
63
|
}
|