jest-preset.js 690 B

12345678910111213141516171819202122232425262728
  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. 'use strict';
  10. module.exports = {
  11. haste: {
  12. defaultPlatform: 'ios',
  13. platforms: ['android', 'ios', 'native'],
  14. },
  15. transform: {
  16. '^.+\\.(js|ts|tsx)$': 'babel-jest',
  17. '^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$': require.resolve(
  18. './jest/assetFileTransformer.js',
  19. ),
  20. },
  21. transformIgnorePatterns: [
  22. 'node_modules/(?!(jest-)?react-native|@react-native-community)',
  23. ],
  24. setupFiles: [require.resolve('./jest/setup.js')],
  25. testEnvironment: 'node',
  26. };