/ jest.config.js
jest.config.js
1 module.exports = { 2 preset: 'jest-expo', 3 testMatch: ['**/__tests__/**/*.test.ts?(x)'], 4 moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], 5 transformIgnorePatterns: [ 6 'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)' 7 ], 8 moduleNameMapper: { 9 '^@/(.*)$': '<rootDir>/src/$1', 10 // Stub out file: dependencies that may not exist in CI 11 '^@aspect/design-tokens$': '<rootDir>/__mocks__/@aspect/design-tokens.js', 12 '^@aspect/brand-assets$': '<rootDir>/__mocks__/@aspect/brand-assets.js', 13 '^@aspect/eslint-plugin-design$': '<rootDir>/__mocks__/@aspect/eslint-plugin-design.js' 14 }, 15 setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], 16 collectCoverageFrom: [ 17 'src/**/*.{ts,tsx}', 18 '!src/**/*.d.ts', 19 '!src/**/__tests__/**' 20 ], 21 coverageThreshold: { 22 global: { 23 branches: 0, 24 functions: 0, 25 lines: 0, 26 statements: 0 27 } 28 } 29 };