Files
jjbruntonandClaude Fable 5 6bc4e31719 chore(mobile): upgrade to Expo SDK 56
Bump expo, react, react-native, and all expo-* / react-native-* peers to
the SDK 56 line via expo install --fix, adding expo-splash-screen and
expo-system-ui for config plugins the SDK split out of core. Bump
@bacons/apple-targets, react-native-view-shot, and other native modules
to versions compatible with React Native 0.85 and the new architecture.

Remove @react-navigation/* direct dependencies and route their hooks
through expo-router, which is no longer compatible with react-navigation
as of SDK 56. Fix RN 0.85's removed StyleSheet.absoluteFillObject (use
absoluteFill) and react-native-view-shot 5.x's ViewShotRef type across
call sites. Downgrade eslint-plugin-react-hooks v7's new React Compiler
era rules to warnings pending a dedicated refactor, and repair Jest
fallout from the jest-expo/reanimated/worklets/expo-media-library bumps.

Regenerate the committed ios/ and android/ native projects with
`expo prebuild --clean` (required for @bacons/apple-targets 5.x) against
the production release channel, and document that requirement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-31 11:11:37 +01:00

45 lines
1.6 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',
// react-native-worklets ships a JS-only mock for its native module at
// this path (react-native-reanimated depends on it internally and has
// no equivalent of its own). Without this, requiring the real
// react-native-worklets under Jest throws because no native module is
// registered.
'^react-native-worklets$': '<rootDir>/../../node_modules/react-native-worklets/src/mock.ts',
},
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/.*)',
],
};