mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Measure untouched mobile source, add regression coverage for native media paths and account operations, and enforce ratcheting API and mobile thresholds in required CI checks.
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
/** @type {import('jest').Config} */
|
|
module.exports = {
|
|
preset: 'jest-expo',
|
|
clearMocks: true,
|
|
setupFiles: [
|
|
'<rootDir>/src/test/setupEnv.js',
|
|
'../../node_modules/react-native-gesture-handler/jestSetup.js',
|
|
],
|
|
setupFilesAfterEnv: [
|
|
'@testing-library/jest-native/extend-expect',
|
|
'<rootDir>/src/test/setup.ts',
|
|
],
|
|
moduleNameMapper: {
|
|
'^@/(.*)$': '<rootDir>/src/$1',
|
|
},
|
|
testMatch: [
|
|
'<rootDir>/src/**/__tests__/**/*.(spec|test).(ts|tsx)',
|
|
'<rootDir>/src/**/*.(spec|test).(ts|tsx)',
|
|
],
|
|
collectCoverageFrom: [
|
|
'<rootDir>/app/**/*.{ts,tsx}',
|
|
'<rootDir>/src/**/*.{ts,tsx}',
|
|
'!<rootDir>/src/**/__tests__/**',
|
|
'!<rootDir>/src/test/**',
|
|
'!<rootDir>/**/*.d.ts',
|
|
],
|
|
coverageThreshold: {
|
|
global: {
|
|
statements: 23,
|
|
branches: 17,
|
|
functions: 21,
|
|
lines: 23,
|
|
},
|
|
},
|
|
transformIgnorePatterns: [
|
|
'node_modules/(?!(jest-)?react-native|@react-native|@react-navigation|expo(nent)?|@expo(nent)?/.*|expo-router|react-native-reanimated|react-native-gesture-handler|react-native-safe-area-context|@sentry/react-native|@sentry/.*)',
|
|
],
|
|
};
|