|
| 1 | +/** |
| 2 | + * Copyright (c) Facebook, Inc. and its affiliates. |
| 3 | + * |
| 4 | + * This source code is licensed under the MIT license found in the |
| 5 | + * LICENSE file in the root directory of this source tree. |
| 6 | + * |
| 7 | + * @format |
| 8 | + */ |
| 9 | + |
| 10 | +'use strict'; |
| 11 | + |
| 12 | +const dir = __dirname; |
| 13 | + |
| 14 | +module.exports = { |
| 15 | + haste: { |
| 16 | + defaultPlatform: 'ios', |
| 17 | + platforms: ['android', 'ios', 'native'], |
| 18 | + hasteImplModulePath: require.resolve('./jest/hasteImpl.js'), |
| 19 | + providesModuleNodeModules: ['react-native'], |
| 20 | + }, |
| 21 | + moduleFileExtensions: ['js', 'json', 'jsx', 'node', 'ts', 'tsx'], |
| 22 | + moduleNameMapper: { |
| 23 | + '^React$': require.resolve('react'), |
| 24 | + }, |
| 25 | + modulePathIgnorePatterns: [`${dir}/Libraries/react-native/`], |
| 26 | + transform: { |
| 27 | + '^.+\\.(js|ts|tsx)$': 'babel-jest', |
| 28 | + '^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$': require.resolve( |
| 29 | + './jest/assetFileTransformer.js', |
| 30 | + ), |
| 31 | + }, |
| 32 | + transformIgnorePatterns: [ |
| 33 | + 'node_modules/(?!(jest-)?react-native|react-clone-referenced-element)', |
| 34 | + ], |
| 35 | + testMatch: [ |
| 36 | + '**/__tests__/**/*.(js|ts|tsx)', |
| 37 | + '**/?(*.)+(spec|test).(js|ts|tsx)', |
| 38 | + ], |
| 39 | + setupFiles: [require.resolve('./jest/setup.js')], |
| 40 | + testEnvironment: 'node', |
| 41 | +}; |
0 commit comments