https://github.com/GeekyAnts/NativeBase
Raw File
Tip revision: 03fd01ea0a88afadf6010219da4a27a507ddded0 authored by Viraj-10 on 08 December 2022, 12:36:34 UTC
fix: hidden ssr issue types
Tip revision: 03fd01e
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