react-native/jest.config.js
James Ide 7a2463e1f3 Delete hasteImpl, providesModuleNodeModules, and modulePathNameMapper (#24811)
Summary:
**Depends on https://github.com/facebook/react-native/pull/25100**

This commit depends on having migrated all of RN away from Haste. With 100% standard path-based requires, the key foundation is set and we no longer need `hasteImpl` and related settings in the Jest configuration.

This commit deletes the `hasteImpl` file and setting as well as `providesModuleNodeModules` and `modulePathNameMapper`, removing most of the dependency graph overriding performed by Jest.

## Changelog

[General] [Changed] - Delete hasteImpl, providesModuleNodeModules, and modulePathNameMapper from Jest config
Pull Request resolved: https://github.com/facebook/react-native/pull/24811

Differential Revision: D15659274

Pulled By: cpojer

fbshipit-source-id: 8a4a3b97ddf7e38fbe62c6d3cc9c98248bfca343
2019-06-05 10:55:08 -07:00

53 lines
1.1 KiB
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
module.exports = {
'transform': {
'^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$': '<rootDir>/jest/assetFileTransformer.js',
'.*': './jest/preprocessor.js',
},
'setupFiles': [
'./jest/setup.js',
],
'timers': 'fake',
'testRegex': '/__tests__/.*-test\\.js$',
'testPathIgnorePatterns': [
'/node_modules/',
'<rootDir>/template',
'Libraries/Renderer',
'RNTester/e2e',
],
'haste': {
'defaultPlatform': 'ios',
'platforms': [
'ios',
'android',
],
},
'unmockedModulePathPatterns': [
'node_modules/react/',
'Libraries/Renderer',
'promise',
'source-map',
'fastpath',
'denodeify',
'fbjs',
],
'testEnvironment': 'node',
'collectCoverageFrom': [
'Libraries/**/*.js',
],
'coveragePathIgnorePatterns': [
'/__tests__/',
'/vendor/',
'<rootDir>/Libraries/react-native/',
],
};