jest-expo 55.0.0-canary-20250912-b5ce2a8 → 55.0.0-canary-20250919-7a31b96

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 CHANGED
@@ -100,7 +100,8 @@ if (!Array.isArray(jestPreset.transformIgnorePatterns)) {
100
100
 
101
101
  // Also please keep `unit-testing.mdx` file up to date
102
102
  jestPreset.transformIgnorePatterns = [
103
- '/node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@sentry/react-native|native-base|react-native-svg)',
103
+ '/node_modules/(?!(.pnpm|react-native|@react-native|@react-native-community|expo|@expo|@expo-google-fonts|react-navigation|@react-navigation|@sentry/react-native|native-base))',
104
+ // Disable transforming the reanimated plugin in multi-platform tests, causing "Reentrant plugin detected trying to load react-native-reanimated/plugin.."
104
105
  '/node_modules/react-native-reanimated/plugin/',
105
106
  ];
106
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jest-expo",
3
- "version": "55.0.0-canary-20250912-b5ce2a8",
3
+ "version": "55.0.0-canary-20250919-7a31b96",
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": "12.0.9-canary-20250912-b5ce2a8",
41
- "@expo/json-file": "10.0.8-canary-20250912-b5ce2a8",
40
+ "@expo/config": "12.0.10-canary-20250919-7a31b96",
41
+ "@expo/json-file": "10.0.8-canary-20250919-7a31b96",
42
42
  "@jest/create-cache-key-function": "^29.2.1",
43
43
  "@jest/globals": "^29.2.1",
44
44
  "babel-jest": "^29.2.1",
@@ -54,7 +54,7 @@
54
54
  "stacktrace-js": "^2.0.2"
55
55
  },
56
56
  "peerDependencies": {
57
- "expo": "55.0.0-canary-20250912-b5ce2a8",
57
+ "expo": "55.0.0-canary-20250919-7a31b96",
58
58
  "react-native": "*"
59
59
  }
60
60
  }
@@ -192,7 +192,25 @@ jest.doMock('react-native/Libraries/LogBox/LogBox', () => ({
192
192
 
193
193
  function attemptLookup(moduleName) {
194
194
  // hack to get the package name from the module name
195
- const filePath = stackTrace.getSync().find((line) => line.fileName.includes(moduleName));
195
+ const filePath = stackTrace.getSync().find((line) => {
196
+ if (line.fileName.includes(moduleName)) {
197
+ return true;
198
+ }
199
+
200
+ if (!fs.existsSync(line.fileName)) {
201
+ return false;
202
+ }
203
+ const fileContents = fs.readFileSync(line.fileName, { encoding: 'utf8' });
204
+ // Matches requireNativeModule<OptionalGeneric>("ModuleName")
205
+ const regexPattern = new RegExp(
206
+ `require(?:Optional)?NativeModule\\s*(?:<${moduleName}Module>)?\\s*\\(['"]${moduleName}['"]\\)`
207
+ );
208
+
209
+ if (regexPattern.test(fileContents)) {
210
+ return true;
211
+ }
212
+ return false;
213
+ });
196
214
  if (!filePath) {
197
215
  return null;
198
216
  }