https://github.com/GeekyAnts/NativeBase
Raw File
Tip revision: 34ec3f0d5986858fedfccbc2339143658214cb0b authored by Suraj Ahmed on 20 September 2022, 06:36:07 UTC
Merge branch 'minor' of github.com:GeekyAnts/NativeBase into fix/typing-3.5.0-utils
Tip revision: 34ec3f0
jest.config.js
const config = {
  projects: [{ preset: 'jest-expo/web' }, { preset: 'jest-expo/node' }],
  transformIgnorePatterns: [
    '<rootDir>/../node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|@sentry/.*)',
  ],
  setupFilesAfterEnv: ['<rootDir>/__mocks__/globalMock.js'],
  globals: {
    window: {},
  },
  moduleNameMapper: {
    '^.+\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js', // replaces .css imports with an empty object
    '\\.(jpg|png|gif|ttf|eot|svg)$': '<rootDir>/__mocks__/fileMock.js', // replaces file imports with a useless string
    '^react($|/.+)': '<rootDir>/node_modules/react$1', // makes sure all React imports are running off of the one in this package.
  },
};

module.exports = config;
back to top