jest-expo 50.0.0-alpha.3 → 50.0.0-alpha.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": "50.0.0-alpha.3",
3
+ "version": "50.0.0-alpha.4",
4
4
  "description": "A Jest preset to painlessly test your Expo / React Native apps.",
5
5
  "license": "MIT",
6
6
  "main": "src",
@@ -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": "da25937e2a99661cbe5eb60ca1d8d6245fc96a50"
51
+ "gitHead": "3142a086578deffd8704a8f1b6f0f661527d836c"
52
52
  }
@@ -269,6 +269,9 @@ module.exports = {
269
269
  { name: 'clearDiskCache', argumentsCount: 0, key: 'clearDiskCache' },
270
270
  { name: 'clearMemoryCache', argumentsCount: 0, key: 'clearMemoryCache' },
271
271
  { name: 'prefetch', argumentsCount: 1, key: 'prefetch' },
272
+ { name: 'getCachePathAsync', argumentsCount: 1, key: 'getCachePathAsync' },
273
+ { name: 'startAnimating', argumentsCount: 0, key: 'startAnimating' },
274
+ { name: 'stopAnimating', argumentsCount: 0, key: 'stopAnimating' },
272
275
  ],
273
276
  ExpoImageManipulator: [
274
277
  { name: 'manipulateAsync', argumentsCount: 3, key: 'manipulateAsync' },
@@ -370,7 +373,7 @@ module.exports = {
370
373
  { name: 'getCurrentInput', argumentsCount: 0, key: 21 },
371
374
  { name: 'startAudioRecording', argumentsCount: 0, key: 22 },
372
375
  ],
373
- ExponentCamera: [
376
+ ExpoCamera: [
374
377
  { name: 'getAvailablePictureSizes', argumentsCount: 2, key: 'getAvailablePictureSizes' },
375
378
  {
376
379
  name: 'getAvailableVideoCodecsAsync',
@@ -702,7 +705,7 @@ module.exports = {
702
705
  SortBy: { type: 'object' },
703
706
  },
704
707
  ExponentAV: { Qualities: { type: 'object' } },
705
- ExponentCamera: {
708
+ ExpoCamera: {
706
709
  AutoFocus: { type: 'object' },
707
710
  FlashMode: { type: 'object' },
708
711
  Type: { type: 'object' },
@@ -807,7 +810,7 @@ module.exports = {
807
810
  ],
808
811
  },
809
812
  ExpoLinearGradient: { propsNames: ['colors', 'endPoint', 'locations', 'startPoint'] },
810
- ExponentCamera: {
813
+ ExpoCamera: {
811
814
  propsNames: [
812
815
  'autoFocus',
813
816
  'barCodeScannerEnabled',
@@ -40,6 +40,10 @@ const expoModules = {
40
40
  ...internalExpoModules,
41
41
  };
42
42
 
43
+ // Mock the experience URL in development mode for asset setup
44
+ expoModules.NativeUnimoduleProxy.modulesConstants.mockDefinition.ExponentConstants.experienceUrl.mock =
45
+ 'exp://192.168.1.200:8081';
46
+
43
47
  function mock(property, customMock) {
44
48
  const propertyType = property.type;
45
49
  let mockValue;
@@ -128,7 +132,7 @@ try {
128
132
  }
129
133
  }
130
134
 
131
- jest.mock('react-native/Libraries/Image/AssetRegistry', () => ({
135
+ jest.mock('@react-native/assets-registry/registry', () => ({
132
136
  registerAsset: jest.fn(() => 1),
133
137
  getAssetByID: jest.fn(() => ({
134
138
  fileSystemLocation: '/full/path/to/directory',
@@ -234,3 +238,6 @@ try {
234
238
  throw error;
235
239
  }
236
240
  }
241
+
242
+ // Ensure the environment globals are installed before the first test runs.
243
+ require('expo/build/winter');