Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
jsx: 'react',
},
diagnostics: false,
},
},
modulePathIgnorePatterns: [
'/build/',
'/node_modules/',
'/.history/',
],
moduleNameMapper: {
'\\.svg': '/__mocks__/svgMock.js',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'babel-jest',
},
setupFiles: [
...expoPreset.setupFiles,
...jestPreset.setupFiles,
'/test/jestSetup.ts',
],
/* eslint-disable */
transformIgnorePatterns: [
'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|@dooboo-ui)',
],
/* eslint-enable */
setupFilesAfterEnv: ['./test/setupTest.js'],
};
const expoPreset = require('jest-expo/jest-preset')
module.exports = Object.assign(expoPreset, jestPreset, {
setupFiles: [...expoPreset.setupFiles, './setup-tests.js'],
transformIgnorePatterns: [
'node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|sentry-expo|native-base)'
],
moduleFileExtensions: ['js', 'ts', 'tsx'],
coverageThreshold: {
global: {
lines: 75
}
},
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/utils/styled-components.ts',
'!src/utils/suppress-rc-warnings.js',
'!src/utils/mock-schema.ts',
'!src/generated/graphql.tsx',
'!src/aws-exports.js',